Tests: Remove Python 2.6 from CI tests

Because:

1. It is old. VERY old.

2. Some useful methods (`assertRaisesRegexp`, `assertIsInstance`) are
   only available from Python 2.7.
pull/4/head
Adrien Vergé 9 years ago
parent fc108e7cee
commit 7b147cb411

@ -1,7 +1,6 @@
---
language: python
python:
- 2.6
- 2.7
- 3.3
- 3.4

@ -65,8 +65,8 @@ class ParserTestCase(unittest.TestCase):
e = list(token_generator(''))
self.assertEqual(len(e), 2)
self.assertEqual(e[0].prev, None)
self.assertTrue(isinstance(e[0].curr, yaml.Token))
self.assertTrue(isinstance(e[0].next, yaml.Token))
self.assertIsInstance(e[0].curr, yaml.Token)
self.assertIsInstance(e[0].next, yaml.Token)
self.assertEqual(e[1].prev, e[0].curr)
self.assertEqual(e[1].curr, e[0].next)
self.assertEqual(e[1].next, None)
@ -74,20 +74,20 @@ class ParserTestCase(unittest.TestCase):
e = list(token_generator('---\n'
'k: v\n'))
self.assertEqual(len(e), 9)
self.assertTrue(isinstance(e[3].curr, yaml.KeyToken))
self.assertTrue(isinstance(e[5].curr, yaml.ValueToken))
self.assertIsInstance(e[3].curr, yaml.KeyToken)
self.assertIsInstance(e[5].curr, yaml.ValueToken)
def test_token_or_line_generator(self):
e = list(token_or_line_generator('---\n'
'k: v\n'))
self.assertEqual(len(e), 12)
self.assertTrue(isinstance(e[0], Token))
self.assertTrue(isinstance(e[0].curr, yaml.StreamStartToken))
self.assertTrue(isinstance(e[1], Token))
self.assertTrue(isinstance(e[1].curr, yaml.DocumentStartToken))
self.assertTrue(isinstance(e[2], Line))
self.assertTrue(isinstance(e[3].curr, yaml.BlockMappingStartToken))
self.assertTrue(isinstance(e[4].curr, yaml.KeyToken))
self.assertTrue(isinstance(e[6].curr, yaml.ValueToken))
self.assertTrue(isinstance(e[8], Line))
self.assertTrue(isinstance(e[11], Line))
self.assertIsInstance(e[0], Token)
self.assertIsInstance(e[0].curr, yaml.StreamStartToken)
self.assertIsInstance(e[1], Token)
self.assertIsInstance(e[1].curr, yaml.DocumentStartToken)
self.assertIsInstance(e[2], Line)
self.assertIsInstance(e[3].curr, yaml.BlockMappingStartToken)
self.assertIsInstance(e[4].curr, yaml.KeyToken)
self.assertIsInstance(e[6].curr, yaml.ValueToken)
self.assertIsInstance(e[8], Line)
self.assertIsInstance(e[11], Line)

Loading…
Cancel
Save