From 21743de7900723a0884cbbc8f77c889a5a1e18ba Mon Sep 17 00:00:00 2001 From: Moin Date: Thu, 29 Dec 2016 14:42:59 +0530 Subject: [PATCH] test for AttributeError in MayaDT comparison operators --- test_maya.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test_maya.py b/test_maya.py index ad1d8b7..99b2389 100644 --- a/test_maya.py +++ b/test_maya.py @@ -138,3 +138,17 @@ def test_comparison_operations(): assert (now >= now_copy) is True assert (now >= tomorrow) is False + + # Check Exceptions + with pytest.raises(TypeError): + now == 1 + with pytest.raises(TypeError): + now != 1 + with pytest.raises(TypeError): + now < 1 + with pytest.raises(TypeError): + now <= 1 + with pytest.raises(TypeError): + now > 1 + with pytest.raises(TypeError): + now >= 1