mirror of
https://github.com/kennethreitz/maya.git
synced 2026-06-05 14:50:19 +00:00
test for AttributeError in MayaDT comparison operators
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user