Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_tokenize_camel_case():
assert ["camel", "Case"] == codespell.tokenize("camelCase")
assert ["Title", "Case"] == codespell.tokenize("TitleCase")
assert ["Title", "Case", "mixed"] == codespell.tokenize("TitleCase mixed")
def test_tokenize_brackets():
assert ["Hello", "World"] == codespell.tokenize("Hello(World)")
assert ["Hello", "World"] == codespell.tokenize("Hello[World]")
assert ["Hello", "World"] == codespell.tokenize("Hello{World}")
assert ["Hello", "World"] == codespell.tokenize("Hello")
def test_tokenize_alphanumeric():
assert ["uzer"] == codespell.tokenize("uzer42")
def test_tokenize_brackets():
assert ["Hello", "World"] == codespell.tokenize("Hello(World)")
assert ["Hello", "World"] == codespell.tokenize("Hello[World]")
assert ["Hello", "World"] == codespell.tokenize("Hello{World}")
assert ["Hello", "World"] == codespell.tokenize("Hello")
def test_tokenize_pointers():
assert ["pointer"] == codespell.tokenize("*pointer")
assert ["pointer"] == codespell.tokenize("&pointer")
assert ["pointer"] == codespell.tokenize("&&*pointer")
def test_tokenize_pointers():
assert ["pointer"] == codespell.tokenize("*pointer")
assert ["pointer"] == codespell.tokenize("&pointer")
assert ["pointer"] == codespell.tokenize("&&*pointer")
def test_tokenize_quotes():
assert ["Hello", "World"] == codespell.tokenize("Hello\"World\"")
assert ["Hello", "World"] == codespell.tokenize("Hello\'World\'")
assert ["Hello", "World"] == codespell.tokenize("Hello \'World\'")
def test_tokenize_brackets():
assert ["Hello", "World"] == codespell.tokenize("Hello(World)")
assert ["Hello", "World"] == codespell.tokenize("Hello[World]")
assert ["Hello", "World"] == codespell.tokenize("Hello{World}")
assert ["Hello", "World"] == codespell.tokenize("Hello")
def test_tokenize_quotes():
assert ["Hello", "World"] == codespell.tokenize("Hello\"World\"")
assert ["Hello", "World"] == codespell.tokenize("Hello\'World\'")
assert ["Hello", "World"] == codespell.tokenize("Hello \'World\'")
def test_tokenize_camel_case():
assert ["camel", "Case"] == codespell.tokenize("camelCase")
assert ["Title", "Case"] == codespell.tokenize("TitleCase")
assert ["Title", "Case", "mixed"] == codespell.tokenize("TitleCase mixed")