diff options
Diffstat (limited to 'Lib/test/test_sys_settrace.py')
| -rw-r--r-- | Lib/test/test_sys_settrace.py | 23 | 
1 files changed, 23 insertions, 0 deletions
| diff --git a/Lib/test/test_sys_settrace.py b/Lib/test/test_sys_settrace.py index 213c88b404..4f13bbd6bf 100644 --- a/Lib/test/test_sys_settrace.py +++ b/Lib/test/test_sys_settrace.py @@ -894,6 +894,29 @@ class TraceTestCase(unittest.TestCase):               (4, 'line'),               (4, 'return')]) +    def test_nested_ifs_with_and(self): + +        def func(): +            if A: +                if B: +                    if C: +                        if D: +                            return False +                else: +                    return False +            elif E and F: +                return True + +        A = B = True +        C = False + +        self.run_and_compare(func, +            [(0, 'call'), +             (1, 'line'), +             (2, 'line'), +             (3, 'line'), +             (3, 'return')]) +      def test_nested_try_if(self):          def func(): | 
