File: astcompiler-test

package info (click to toggle)
pypy3 7.3.20%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 212,628 kB
  • sloc: python: 2,101,020; ansic: 540,684; sh: 21,462; asm: 14,419; cpp: 4,451; makefile: 4,209; objc: 761; xml: 530; exp: 499; javascript: 314; pascal: 244; lisp: 45; csh: 12; awk: 4
file content (26 lines) | stat: -rw-r--r-- 1,116 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From: CF Bolz-Tereick <cfbolz@gmx.de>
Date: Sun, 24 Aug 2025 22:02:21 +0200
Subject: gh-5328: add a failing test for the problem

Bug-Debian: https://bugs.debian.org/1119266
Bug-Upstream: https://github.com/pypy/pypy/issues/5328
Origin: upstream, 8941fbfca4bd5e7d373acad70512ec147014f3d8
---
 pypy/interpreter/astcompiler/test/test_compiler.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/pypy/interpreter/astcompiler/test/test_compiler.py b/pypy/interpreter/astcompiler/test/test_compiler.py
index 417f6e8..7843c31 100644
--- a/pypy/interpreter/astcompiler/test/test_compiler.py
+++ b/pypy/interpreter/astcompiler/test/test_compiler.py
@@ -2398,6 +2398,10 @@ match x:
     def test_type_with_star_311(self):
         self.st("def func1(*args: *(1, )): pass", "func1.__annotations__['args']", 1)
 
+    @pytest.mark.xfail
+    def test_if_call_or_call_bug(self):
+        # used to crash
+        compile_with_astcompiler("def func_if_call_or_call():\n    if a: f1() or g1()\n", 'exec', self.space)
 
 class TestLinenoChanges310(object):
     def get_line_numbers(self, source, expected, function=False):