From 6b5152ae131ea2bd15f6c998de223b72b0c9e65d Mon Sep 17 00:00:00 2001 From: Tomer Keren Date: Sat, 13 Apr 2019 18:58:38 +0300 Subject: [PATCH] Sanity tests for loop unrolling --- testing/test_assertrewrite.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/testing/test_assertrewrite.py b/testing/test_assertrewrite.py index 72bfbcc55..c22ae7c6e 100644 --- a/testing/test_assertrewrite.py +++ b/testing/test_assertrewrite.py @@ -656,6 +656,12 @@ class TestAssertionRewrite(object): else: 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 f(): class A(object):