Skip to content

Commit

Permalink
test_irregular_tablenames compat with Python 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
tmylk committed Jun 28, 2016
1 parent f4f2fe4 commit bb21215
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

1 comment on commit bb21215

@Digenis
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the record, this is not python-2.6 compatibility
but for sqlitedict.tests.accessories.TestCaseBackport
which doesn't implement the normal assertRaisesRegexp
but only the context manager.

Please sign in to comment.