From 3d60b4158ee1485f3c5510796bd19042292eedd5 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 30 Jan 2018 15:51:30 -0500 Subject: [PATCH] Disable set eq test for python < 2.7.8 A test added in 1.2 thought to confirm a Python 2.7 behavior turns out to be confirming the behavior only as of Python 2.7.8. Python bug #8743 still impacts set comparison in Python 2.7.7 and earlier, so the test in question involving AssociationSet no longer runs for these older Python 2.7 versions. Change-Id: I4e5ab650fdcbfd215535c58438878e98ef924a9b Fixes: #3265 --- doc/build/changelog/unreleased_12/3265.rst | 9 +++++++++ test/ext/test_associationproxy.py | 3 ++- test/requirements.py | 7 +++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 doc/build/changelog/unreleased_12/3265.rst diff --git a/doc/build/changelog/unreleased_12/3265.rst b/doc/build/changelog/unreleased_12/3265.rst new file mode 100644 index 0000000000..1c97b728ad --- /dev/null +++ b/doc/build/changelog/unreleased_12/3265.rst @@ -0,0 +1,9 @@ +.. change:: + :tags: bug, tests + :tickets: 3265 + + A test added in 1.2 thought to confirm a Python 2.7 behavior turns out to + be confirming the behavior only as of Python 2.7.8. Python bug #8743 still + impacts set comparison in Python 2.7.7 and earlier, so the test in question + involving AssociationSet no longer runs for these older Python 2.7 + versions. diff --git a/test/ext/test_associationproxy.py b/test/ext/test_associationproxy.py index d8fd4dc9db..0052bb1884 100644 --- a/test/ext/test_associationproxy.py +++ b/test/ext/test_associationproxy.py @@ -601,8 +601,9 @@ class SetTest(_CollectionOperations): self.assert_((p1.children > other) == (control > other)) self.assert_((p1.children >= other) == (control >= other)) + @testing.requires.python_fixed_issue_8743 def test_set_comparison_empty_to_empty(self): - # test issue #3265 which appears to be python 2.6 specific + # test issue #3265 which was fixed in Python version 2.7.8 Parent = self.Parent p1 = Parent('P1') diff --git a/test/requirements.py b/test/requirements.py index f4ce0f0feb..d7eaec5fdb 100644 --- a/test/requirements.py +++ b/test/requirements.py @@ -1008,6 +1008,13 @@ class DefaultRequirements(SuiteRequirements): def no_mssql_freetds(self): return self.mssql_freetds.not_() + @property + def python_fixed_issue_8743(self): + return exclusions.skip_if( + lambda: sys.version_info < (2, 7, 8), + "Python issue 8743 fixed in Python 2.7.8" + ) + @property def selectone(self): """target driver must support the literal statement 'select 1'""" -- 2.47.2