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 '/tmp/usession-py3.11-30/test_all.py'
rlib/rvmprof/test/test_traceback.py:144: AssertionError
---------- Captured stdout call ----------
============================= test session starts ==============================
platform linux2 -- 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('/workspace/rpython/.hypothesis/examples')
rootdir: /tmp/usession-py3.11-30, inifile:
plugins: hypothesis-4.39.3
collected 0 items / 1 errors
==================================== ERRORS ====================================
_________________________ ERROR collecting test_all.py _________________________
/tmp/usession-py3.11-30/test_all.py:3: in <module>
import re, pytest
E ImportError: No module named builtins
=========================== 1 error in 0.05 seconds ============================
(somefailed=True in rlib/rvmprof/test/test_traceback.py)
builder: rpython-linux-x86-64 build #727*
test: rlib/rvmprof/test/test_traceback.py::test_all