From 3b8d79a68267fc2d814605119e6a8fe6d14649e5 Mon Sep 17 00:00:00 2001 From: BPYap <32807097+BPYap@users.noreply.github.com> Date: Sat, 30 Jun 2018 14:58:17 +0800 Subject: [PATCH 1/2] Added test case for issue #859 --- tests/datatypes/test_set.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/datatypes/test_set.py b/tests/datatypes/test_set.py index 6dc6592b9f..9f9c1f0764 100644 --- a/tests/datatypes/test_set.py +++ b/tests/datatypes/test_set.py @@ -1,7 +1,20 @@ +from unittest import expectedFailure + from .. utils import TranspileTestCase, UnaryOperationTestCase, BinaryOperationTestCase, InplaceOperationTestCase class SetTests(TranspileTestCase): + @expectedFailure + def test_same_hash_different_datatypes(self): + self.assertCodeExecution(""" + x = {1, 1.0, True} + + print("size of set is:", len(x)) + + for i in x: + print(i) + """) + def test_setattr(self): self.assertCodeExecution(""" x = {1, 2, 3} From 51ea0dbf2000f4e77052fbc8e7517786374d6e3b Mon Sep 17 00:00:00 2001 From: Yap Boon Peng <32807097+BPYap@users.noreply.github.com> Date: Sat, 30 Jun 2018 15:26:24 +0800 Subject: [PATCH 2/2] Changed naming of test case --- tests/datatypes/test_set.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/datatypes/test_set.py b/tests/datatypes/test_set.py index 9f9c1f0764..468b97d173 100644 --- a/tests/datatypes/test_set.py +++ b/tests/datatypes/test_set.py @@ -5,7 +5,7 @@ class SetTests(TranspileTestCase): @expectedFailure - def test_same_hash_different_datatypes(self): + def test_equal_value_different_datatypes(self): self.assertCodeExecution(""" x = {1, 1.0, True}