Beispiel #1
0
 def test_range(self, case):
     inputs, result = case
     token = Range(inputs)
     self.assertFalse(bool({'r1', 'r2', 'n1', 'n2'} - set(token.attr)))
     output = token.name
     self.assertEqual(result, output, '%s != %s' % (result, output))
Beispiel #2
0
 def test_invalid_range(self, inputs):
     with self.assertRaises(TokenError):
         Range(inputs)