diff options
| author | Alex Gaynor <alex.gaynor@rd.io> | 2013-04-19 10:58:29 -0700 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@rd.io> | 2013-04-19 10:58:29 -0700 |
| commit | 714161c8642646f1f617436479313ca49c71b5c8 (patch) | |
| tree | 6cc97f81be0a29d52ed9e32fb2e72192c7532933 /tests/utils_tests/test_simplelazyobject.py | |
| parent | 59d127e45f5ed31e346162a0ac312f672c096821 (diff) | |
Fix != operations on lazy objects.
Diffstat (limited to 'tests/utils_tests/test_simplelazyobject.py')
| -rw-r--r-- | tests/utils_tests/test_simplelazyobject.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/utils_tests/test_simplelazyobject.py b/tests/utils_tests/test_simplelazyobject.py index 883e60aa81..f925e01eb6 100644 --- a/tests/utils_tests/test_simplelazyobject.py +++ b/tests/utils_tests/test_simplelazyobject.py @@ -152,3 +152,12 @@ class TestUtilsSimpleLazyObject(TestCase): SimpleLazyObject(None) finally: sys.settrace(old_trace_func) + + def test_not_equal(self): + lazy1 = SimpleLazyObject(lambda: 2) + lazy2 = SimpleLazyObject(lambda: 2) + lazy3 = SimpleLazyObject(lambda: 3) + self.assertEqual(lazy1, lazy2) + self.assertNotEqual(lazy1, lazy3) + self.assertTrue(lazy1 != lazy3) + self.assertFalse(lazy1 != lazy2) |
