Beispiel #1
0
 def test_returns_3_with_garbage_and_bangs(self):
     expected = 3
     actual = stream_processing('{{<!>},{<!>},{<!>},{<a>}}')
     self.assertEqual(expected, actual)
Beispiel #2
0
 def test_returns_1_for_single_group_with_only_garbage_within(self):
     expected = 1
     actual = stream_processing('{<a>,<a>,<a>,<a>}')
     self.assertEqual(expected, actual)
Beispiel #3
0
 def test_returns_9_for_garbage_that_doesnt_cancel_groups(self):
     expected = 9
     actual = stream_processing('{{<a>},{<a>},{<a>},{<a>}}')
     self.assertEqual(expected, actual)
Beispiel #4
0
 def test_returns_1_when_garbage_contains_all_but_outer_group(self):
     expected = 1
     actual = stream_processing('{<{},{},{{}}>}')
     self.assertEqual(expected, actual)
Beispiel #5
0
 def test_returns_16_for_group_assortment_with_commas(self):
     expected = 16
     actual = stream_processing('{{{},{},{{}}}}')
     self.assertEqual(expected, actual)
Beispiel #6
0
 def test_returns_5_for_three_groups_with_commas(self):
     expected = 5
     actual = stream_processing('{{},{}}')
     self.assertEqual(expected, actual)
Beispiel #7
0
 def test_returns_6_for_three_groups(self):
     expected = 6
     actual = stream_processing('{{{}}}')
     self.assertEqual(expected, actual)
Beispiel #8
0
 def test_returns_1_for_single_group(self):
     expected = 1
     actual = stream_processing('{}')
     self.assertEqual(expected, actual)