Message392154
FYI I used the following patch to debug this issue:
diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py
index 872f121127..ee2e1ff77f 100644
--- a/Lib/unittest/case.py
+++ b/Lib/unittest/case.py
@@ -546,6 +546,8 @@ def _callSetUp(self):
self.setUp()
def _callTestMethod(self, method):
+ if sys.gettrace() is not None:
+ raise Exception("sys.gettrace() is not None")
method()
def _callTearDown(self):
And I used the following script:
---------------
import random
import os.path
import sys
with open("tests") as fp:
lines = list(filter(bool, (line.strip() for line in fp)))
print(len(lines))
filename = "test"
loop = 2
while os.path.exists(filename):
filename = "test%s" % loop
loop += 1
with open(filename, "w") as fp:
for _ in range(5):
test = random.choice(lines)
print(test, file=fp)
print("test_signal", file=fp)
with open(filename) as fp:
for line in fp:
print(line.rstrip())
args = [sys.executable, "-m", "test", "--fromfile=" + filename]
print("RUN", args)
os.execv(args[0], args)
---------------
I created the "tests" file using the command:
python -m test --list-tests > tests
Then I removed all tests starting at test_signal, including test_signal. I removed slow tests like asyncio and multiprocessing tests. |
|
Date |
User |
Action |
Args |
2021-04-27 23:40:30 | vstinner | set | recipients:
+ vstinner, gvanrossum, tim.peters, paul.moore, tim.golden, Mark.Shannon, zach.ware, serhiy.storchaka, steve.dower, Guido.van.Rossum, corona10, shihai1991, shreyanavigyan |
2021-04-27 23:40:30 | vstinner | set | messageid: <1619566830.41.0.414238945619.issue43955@roundup.psfhosted.org> |
2021-04-27 23:40:30 | vstinner | link | issue43955 messages |
2021-04-27 23:40:30 | vstinner | create | |
|