From da7afe7c052307a2d7b7d6db3e8ecab8808e4729 Mon Sep 17 00:00:00 2001 From: Justin Shacklette Date: Sun, 7 Oct 2018 14:53:50 -0600 Subject: [PATCH] fixes #83 - fixup py 3.7 tuple comparison test --- tests/test_same_as.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_same_as.py b/tests/test_same_as.py index 97dc7f0..2676d05 100644 --- a/tests/test_same_as.py +++ b/tests/test_same_as.py @@ -26,6 +26,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +import sys from assertpy import assert_that, fail @@ -54,7 +55,11 @@ def test_is_not_same_as(): assert_that({'a':1}).is_not_same_as({'a':1}) assert_that([1,2,3]).is_not_same_as([1,2,3]) - assert_that((1,2,3)).is_not_same_as((1,2,3)) + + if sys.version_info[0] == 3 and sys.version_info[1] >= 7: + assert_that((1,2,3)).is_same_as((1,2,3)) # tuples are identical in py 3.7 + else: + assert_that((1,2,3)).is_not_same_as((1,2,3)) def test_is_not_same_as_failure():