Skip to content

Commit

Permalink
fixes assertpy#83 - fixup py 3.7 tuple comparison test
Browse files Browse the repository at this point in the history
  • Loading branch information
saturnboy committed Oct 7, 2018
1 parent 8dba6a3 commit da7afe7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_same_as.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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():
Expand Down

0 comments on commit da7afe7

Please sign in to comment.