Beispiel #1
0
 def test_snakeize_revert(self):
     assert kebabize(snakeize('var-name')) == 'var-name'
Beispiel #2
0
 def test_lowercase(self):
     assert snakeize('stringio') == 'stringio'
Beispiel #3
0
 def test_snakecase(self):
     assert snakeize('var_name') == 'var_name'
Beispiel #4
0
 def test_kebabize_revert(self):
     assert snakeize(kebabize('long_url_path')) == 'long_url_path'
Beispiel #5
0
 def test_pascalize_revert(self):
     assert snakeize(pascalize('string_io')) == 'string_io'
Beispiel #6
0
 def test_camelcase(self):
     assert snakeize('currentThread') == 'current_thread'
Beispiel #7
0
 def test_camelize_revert(self):
     assert snakeize(camelize('current_thread')) == 'current_thread'
Beispiel #8
0
 def test_kebabcase_and_acronyms(self):
     assert snakeize('long-url-path', acronyms=['URL']) == 'long_url_path'
Beispiel #9
0
 def test_camelcase_and_acronyms(self):
     assert snakeize('currentThread', acronyms=['THREAD']) == 'current_thread'
Beispiel #10
0
 def test_lowercase_and_acronyms(self):
     assert snakeize('stringio', acronyms=['IO']) == 'string_io'
Beispiel #11
0
 def test_snakecase_and_acronyms(self):
     assert snakeize('var_name', acronyms=['VA']) == 'va_r_name'
Beispiel #12
0
 def test_dunder_name(self):
     assert snakeize('__dunderName__') == '__dunder_name__'
Beispiel #13
0
 def test_protected_name(self):
     assert snakeize('_protectedName') == '_protected_name'
Beispiel #14
0
 def test_pascalcase(self):
     assert snakeize('StringIO') == 'string_io'
Beispiel #15
0
 def test_snakeize_revert(self):
     assert camelize(snakeize('specialGuest')) == 'specialGuest'
Beispiel #16
0
 def test_pascalcase_and_acronyms(self):
     assert snakeize('StringIO', acronyms=['IO']) == 'string_io'
 def test_snakeize_revert(self):
     assert pascalize(snakeize('VarName')) == 'VarName'
Beispiel #18
0
 def test_kebabcase(self):
     assert snakeize('long-url-path') == 'long_url_path'