work around a bunch of bugs;
This commit is contained in:
parent
b393ebb54a
commit
4f00db572f
@ -134,7 +134,7 @@ class Database(object):
|
||||
"""
|
||||
Get a listing of all tables that exist in the database.
|
||||
"""
|
||||
return self._tables.keys()
|
||||
return list(self._tables.keys())
|
||||
|
||||
def __contains__(self, member):
|
||||
return member in self.tables
|
||||
|
||||
@ -253,6 +253,8 @@ class Table(object):
|
||||
|
||||
table.drop_column('created_at')
|
||||
"""
|
||||
if self.database.engine.dialect.name == 'sqlite':
|
||||
raise NotImplementedError("SQLite does not support dropping columns.")
|
||||
self._check_dropped()
|
||||
self.database._acquire()
|
||||
try:
|
||||
|
||||
@ -315,8 +315,11 @@ class TableTestCase(unittest.TestCase):
|
||||
assert 'date' in cols and 'temperature' in cols and 'place' in cols
|
||||
|
||||
def test_drop_column(self):
|
||||
try:
|
||||
self.tbl.drop_column('date')
|
||||
assert 'date' not in self.tbl.columns
|
||||
except NotImplementedError:
|
||||
pass
|
||||
|
||||
def test_iter(self):
|
||||
c = 0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user