rlib/rvmprof/test/test_traceback.py::test_all
@pytest.mark.flaky
def test_all():
import os, sys, subprocess
thisfile = os.path.abspath(__file__)
if thisfile.endswith("pyc"):
thisfile = thisfile[:-1]
testfile = udir.join("test_all.py")
with open(thisfile) as infid:
text = infid.read()
text = text.replace('def _test_', 'def test_')
text = text.replace('def test_all', 'def _test_all')
with open(str(testfile), "wt") as outfid:
outfid.write("#copied from '%s'\n\n" % thisfile)
outfid.write(text)
p = subprocess.Popen([sys.executable, pytest.__file__, str(testfile)],
universal_newlines=True)
result = p.wait()
> assert result == 0, "tests failed, run using '%s'" % testfile
E AssertionError: tests failed, run using '/var/folders/8j/sfr9qqcj73j4p6nhwcfpr0th0000gn/T/usession-py3.11-30/test_all.py'
rlib/rvmprof/test/test_traceback.py:144: AssertionError
---------- Captured stdout call ----------
============================= test session starts ==============================
platform darwin -- Python 2.7.18[pypy-7.3.22-final], pytest-2.9.2, py-1.4.29, pluggy-0.3.1
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/Users/runner/work/pypy/pypy/rpython/.hypothesis/examples')
rootdir: /var/folders/8j/sfr9qqcj73j4p6nhwcfpr0th0000gn/T/usession-py3.11-30, inifile:
plugins: hypothesis-4.39.3
collected 0 items / 1 errors
==================================== ERRORS ====================================
_________________________ ERROR collecting test_all.py _________________________
/var/folders/8j/sfr9qqcj73j4p6nhwcfpr0th0000gn/T/usession-py3.11-30/test_all.py:3: in <module>
import re, pytest
E ImportError: No module named builtins
=========================== 1 error in 0.02 seconds ============================
(somefailed=True in rlib/rvmprof/test/test_traceback.py)
builder: rpython-macos-arm64 build #727*
test: rlib/rvmprof/test/test_traceback.py::test_all