homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Guido.van.Rossum, Mark.Shannon, corona10, gvanrossum, paul.moore, serhiy.storchaka, shihai1991, shreyanavigyan, steve.dower, tim.golden, tim.peters, vstinner, zach.ware
Date 2021年04月27日.23:40:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1619566830.41.0.414238945619.issue43955@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021年04月27日 23:40:30vstinnersetrecipients: + 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:30vstinnersetmessageid: <1619566830.41.0.414238945619.issue43955@roundup.psfhosted.org>
2021年04月27日 23:40:30vstinnerlinkissue43955 messages
2021年04月27日 23:40:30vstinnercreate

AltStyle によって変換されたページ (->オリジナル) /