Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
assert codeblock.content.strip() == ''
assert not codeblock.language
text = """
```
se``ven
```
"""
codeblock = codeblock_converter(inspect.cleandoc(text))
assert isinstance(codeblock, Codeblock)
assert codeblock.content.strip() == 'se``ven'
assert not codeblock.language
text = "``ei`ght``"
codeblock = codeblock_converter(text)
assert isinstance(codeblock, Codeblock)
assert codeblock.content.strip() == 'ei`ght'
assert not codeblock.language
text = "`nine`"
codeblock = codeblock_converter(text)
assert isinstance(codeblock, Codeblock)
assert codeblock.content.strip() == 'nine'
assert not codeblock.language
```
"""
codeblock = codeblock_converter(inspect.cleandoc(text))
assert isinstance(codeblock, Codeblock)
assert codeblock.content.strip() == 'se``ven'
assert not codeblock.language
text = "``ei`ght``"
codeblock = codeblock_converter(text)
assert isinstance(codeblock, Codeblock)
assert codeblock.content.strip() == 'ei`ght'
assert not codeblock.language
text = "`nine`"
codeblock = codeblock_converter(text)
assert isinstance(codeblock, Codeblock)
assert codeblock.content.strip() == 'nine'
assert not codeblock.language
text = ""
codeblock = codeblock_converter(inspect.cleandoc(text))
assert isinstance(codeblock, Codeblock)
assert codeblock.content.strip() == ''
assert not codeblock.language
text = """
```
se``ven
```
"""
codeblock = codeblock_converter(inspect.cleandoc(text))
assert isinstance(codeblock, Codeblock)
assert codeblock.content.strip() == 'se``ven'
assert not codeblock.language
text = "``ei`ght``"
codeblock = codeblock_converter(text)
assert isinstance(codeblock, Codeblock)
assert codeblock.content.strip() == 'ei`ght'
assert not codeblock.language
text = "`nine`"
codeblock = codeblock_converter(text)
assert isinstance(codeblock, Codeblock)
assert codeblock.content.strip() == 'nine'
assert not codeblock.language