コード例 #1
0
ファイル: utils_tests.py プロジェクト: tzok/pymolprobity
 def test_non_string_input(self):
     inp = 1
     res = ut.slugify(inp)
     ref = 1
     self.assertEqual(res, ref)
コード例 #2
0
ファイル: utils_tests.py プロジェクト: tzok/pymolprobity
 def test_custom_separator(self):
     inp = 'some string'
     res = ut.slugify(inp, sep='!')
     ref = 'some!string'
     self.assertEqual(res, ref)
コード例 #3
0
ファイル: utils_tests.py プロジェクト: tzok/pymolprobity
 def test_leading_trailing_junk(self):
     inp = ' this string had leading and trailing space '
     res = ut.slugify(inp)
     ref = 'this_string_had_leading_and_trailing_space'
     self.assertEqual(res, ref)
コード例 #4
0
ファイル: utils_tests.py プロジェクト: tzok/pymolprobity
 def test_multiple_adjacent_separators(self):
     inp = 'this   string   had   extra    spaces'
     res = ut.slugify(inp)
     ref = 'this_string_had_extra_spaces'
     self.assertEqual(res, ref)
コード例 #5
0
ファイル: utils_tests.py プロジェクト: tzok/pymolprobity
 def test_basic(self):
     inp = 'Some string 1'
     res = ut.slugify(inp)
     ref = 'Some_string_1'
     self.assertEqual(res, ref)