We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9679229 commit 0088286Copy full SHA for 0088286
tryingsnake/test/test_try.py
@@ -161,6 +161,13 @@ def test_fail_with_unhashable_value(self):
161
with pytest.raises(TypeError):
162
hash(Success([1]))
163
164
+ class UnhashableException(Exception):
165
+ def __hash__(self):
166
+ raise TypeError()
167
+
168
+ with pytest.raises(TypeError):
169
+ hash(Failure(UnhashableException()))
170
171
def test_generator_without_arguments(self):
172
g = (lambda: (yield 1))()
173
self.assertEqual(Try(g).map(lambda x: x + 1), Success(2))
0 commit comments