From: Mike Bayer Date: Thu, 13 Mar 2014 23:05:22 +0000 (-0400) Subject: - add a suite test for underscore as initial char X-Git-Tag: rel_0_9_4~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd40c638857d06e0c50d50523d4c9412f0953334;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - add a suite test for underscore as initial char --- diff --git a/lib/sqlalchemy/testing/suite/test_ddl.py b/lib/sqlalchemy/testing/suite/test_ddl.py index 946e10aa82..b14d47b4d3 100644 --- a/lib/sqlalchemy/testing/suite/test_ddl.py +++ b/lib/sqlalchemy/testing/suite/test_ddl.py @@ -16,6 +16,12 @@ class TableDDLTest(fixtures.TestBase): Column('data', String(50)) ) + def _underscore_fixture(self): + return Table('_test_table', self.metadata, + Column('id', Integer, primary_key=True, autoincrement=False), + Column('_data', String(50)) + ) + def _simple_roundtrip(self, table): with config.db.begin() as conn: conn.execute(table.insert().values((1, 'some data'))) @@ -45,5 +51,13 @@ class TableDDLTest(fixtures.TestBase): config.db, checkfirst=False ) + @requirements.create_table + @util.provide_metadata + def test_underscore_names(self): + table = self._underscore_fixture() + table.create( + config.db, checkfirst=False + ) + self._simple_roundtrip(table) __all__ = ('TableDDLTest', )