From bb212154844d11a22f9cff4bd7887483ae5b5cdb Mon Sep 17 00:00:00 2001 From: Lev Konstantinovskiy Date: Tue, 28 Jun 2016 18:14:32 -0400 Subject: [PATCH] `test_irregular_tablenames` compat with Python 2.6 --- tests/test_core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_core.py b/tests/test_core.py index c9f861e..fc1e186 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -144,9 +144,9 @@ def test_irregular_tablenames(self): self.assertEqual(db['key'], 'value') db.close() - self.assertRaisesRegexp(ValueError, r'^Invalid tablename ', - sqlitedict.SqliteDict, ':memory:', '"') - + with self.assertRaisesRegexp(ValueError, r'^Invalid tablename '): + sqlitedict.SqliteDict(':memory:', '"') + def test_overwrite_using_flag_w(self): """Re-opening of a database with flag='w' destroys only the target table.""" # given,