Make table instances singleton-ish.

This commit is contained in:
Friedrich Lindenberg
2017-09-02 22:35:29 +02:00
parent bf17deeb7f
commit 37d7f47d39
3 changed files with 95 additions and 107 deletions
+6
View File
@@ -346,6 +346,12 @@ class TableTestCase(unittest.TestCase):
self.db['weather'].drop()
assert 'weather' not in self.db
def test_table_drop_then_create(self):
assert 'weather' in self.db
self.db['weather'].drop()
assert 'weather' not in self.db
self.db['weather'].insert({'foo': 'bar'})
def test_columns(self):
cols = self.tbl.columns
assert len(list(cols)) == 4, 'column count mismatch'