From: Adrien Berchet Date: Mon, 8 Apr 2019 07:13:18 +0000 (+0200) Subject: Fix tests with py27. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e3f29ae98d7cb94eae53dfaed2b2b898e44b391e;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Fix tests with py27. --- diff --git a/test/sql/test_deprecations.py b/test/sql/test_deprecations.py index 7a65c59efc..a56dcf6724 100644 --- a/test/sql/test_deprecations.py +++ b/test/sql/test_deprecations.py @@ -172,7 +172,7 @@ class DeprecationWarningsTest(fixtures.TestBase): not_in_("MYFUNC", reg) not_in_("MyFunc", reg) in_("myfunc", cs_reg) - eq_(list(cs_reg['myfunc'].keys()), ['MYFUNC']) + eq_(set(cs_reg['myfunc'].keys()), set(['MYFUNC'])) with testing.expect_deprecated(): class MyFunc(GenericFunction): @@ -189,7 +189,7 @@ class DeprecationWarningsTest(fixtures.TestBase): not_in_("MYFUNC", reg) not_in_("MyFunc", reg) in_("myfunc", cs_reg) - eq_(list(cs_reg['myfunc'].keys()), ['MYFUNC', 'MyFunc']) + eq_(set(cs_reg['myfunc'].keys()), set(['MYFUNC', 'MyFunc'])) def test_replace_function_case_sensitive(self): reg = functions._registry['_default'] @@ -208,8 +208,7 @@ class DeprecationWarningsTest(fixtures.TestBase): not_in_("REPLACEABLE_FUNC", reg) not_in_("Replaceable_Func", reg) in_("replaceable_func", cs_reg) - eq_(list(cs_reg['replaceable_func'].keys()), - ['REPLACEABLE_FUNC']) + eq_(set(cs_reg['replaceable_func'].keys()), set(['REPLACEABLE_FUNC'])) with testing.expect_deprecated(): class Replaceable_Func(GenericFunction): @@ -225,8 +224,8 @@ class DeprecationWarningsTest(fixtures.TestBase): not_in_("REPLACEABLE_FUNC", reg) not_in_("Replaceable_Func", reg) in_("replaceable_func", cs_reg) - eq_(list(cs_reg['replaceable_func'].keys()), - ['REPLACEABLE_FUNC', 'Replaceable_Func']) + eq_(set(cs_reg['replaceable_func'].keys()), + set(['REPLACEABLE_FUNC', 'Replaceable_Func'])) with expect_warnings(): class replaceable_func_override(GenericFunction): @@ -252,8 +251,8 @@ class DeprecationWarningsTest(fixtures.TestBase): not_in_("REPLACEABLE_FUNC", reg) not_in_("Replaceable_Func", reg) in_("replaceable_func", cs_reg) - eq_(list(cs_reg['replaceable_func'].keys()), - ['REPLACEABLE_FUNC', 'Replaceable_Func', 'replaceable_func']) + eq_(set(cs_reg['replaceable_func'].keys()), + set(['REPLACEABLE_FUNC', 'Replaceable_Func', 'replaceable_func'])) class DDLListenerDeprecationsTest(fixtures.TestBase):