- raises(RuntimeError, it.next)
+ raises(RuntimeError, it.next)
assert d.get(Foo()) is None # this changes the strategy of 'd'
lst = list(it) # but iterating still works
assert sorted(lst) == [(1, 2), (3, 4), (5, 6)]
+ # on default the strategy changes and thus we get the RuntimeError
+ # (commented below). On py3k, we Int and String strategies don't work
+ # yet, and thus we get the "correct" behavior
+ assert set(items) == set([(3, 4), (5, 6), ('foo', 'bar')])
# 'd' is still length 3, but its strategy changed. we are
# getting a RuntimeError because iterating over the old storage
# gives us (1, 2), but 1 is not in the dict any longer.
- raises(RuntimeError, list, it)
+ raises(RuntimeError, list, it)