test for AttributeError in MayaDT comparison operators

This commit is contained in:
Moin
2016-12-29 14:42:59 +05:30
parent 09c3e352e4
commit 21743de790
+14
View File
@@ -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