Sanity tests for loop unrolling

This commit is contained in:
Tomer Keren 2019-04-13 18:58:38 +03:00
parent 19035f4b55
commit 6b5152ae13
1 changed files with 6 additions and 0 deletions

View File

@ -656,6 +656,12 @@ class TestAssertionRewrite(object):
else: else:
assert lines == ["assert 0 == 1\n + where 1 = \\n{ \\n~ \\n}.a"] assert lines == ["assert 0 == 1\n + where 1 = \\n{ \\n~ \\n}.a"]
def test_all_unroll(self):
def f():
assert all(x == 1 for x in range(10))
assert "0 != 1" in getmsg(f)
def test_custom_repr_non_ascii(self): def test_custom_repr_non_ascii(self):
def f(): def f():
class A(object): class A(object):