Beispiel #1
0
 def test_already_cleaned_returns_cleaned_value(self):
     i = '{}'
     expected = '{}'
     actual = clean(i)
     self.assertEqual(expected, actual)
Beispiel #2
0
 def test_removes_bangs_and_garbage(self):
     i = '{{<a!>},{<a!>},{<a!>},{<ab>}}'
     expected = '{{}}'
     actual = clean(i)
     self.assertEqual(expected, actual)
Beispiel #3
0
 def test_removes_bangs_appropriately(self):
     i = '{{<!!>},{<!!>},{<!!>},{<!!>}}'
     expected = '{{}{}{}{}}'
     actual = clean(i)
     self.assertEqual(expected, actual)
Beispiel #4
0
 def test_removes_nested_garbage_and_retrains_groups(self):
     i = '{{<ab>},{<ab>},{<ab>},{<ab>}}'
     expected = '{{}{}{}{}}'
     actual = clean(i)
     self.assertEqual(expected, actual)
Beispiel #5
0
 def test_removes_all_garbage(self):
     i = '{<a>,<a>,<a>,<a>}'
     expected = '{}'
     actual = clean(i)
     self.assertEqual(expected, actual)
Beispiel #6
0
 def test_complex_removed_commas(self):
     i = '{{{},{},{{}}}}'
     expected = '{{{}{}{{}}}}'
     actual = clean(i)
     self.assertEqual(expected, actual)