[New-bugs-announce] [issue35412] test_future4 ran no test

STINNER Victor report at bugs.python.org
Tue Dec 4 17:37:17 EST 2018

New submission from STINNER Victor <vstinner at redhat.com>:

Since bpo-34279 has been fixed, regrtest now logs a message when a test runs no test. I noticed that test_future4 logs such message:

0:05:23 load avg: 0.56 [152/412] test_future4
0:05:24 load avg: 0.56 [153/412] test_future5 -- test_future4 run no tests
2 tests run no tests:
    test_dtrace test_future4

I can reproduce the issue:

$ ./python -m test test_future4
test_future4 run no tests
Tests result: NO TEST RUN

The test has been added by:
commit 62e2c7e3dfffd8465a54b99fc6d3c2a60acab350
Author: Jeremy Hylton <jeremy at alum.mit.edu>
Date:   Wed Feb 28 17:48:06 2001 +0000

    Add regression test for future statements.  This adds eight files, but
    seven are not tests in their own right; these files are mentioned in

diff --git a/Lib/test/test_future4.py b/Lib/test/test_future4.py
new file mode 100644
index 0000000000..805263be89
--- /dev/null
+++ b/Lib/test/test_future4.py
@@ -0,0 +1,10 @@
+"""This is a test"""
+import __future__
+from __future__ import nested_scopes
+def f(x):
+    def g(y):
+        return x + y
+    return g
+print f(2)(4)

... test removed by commit 3090694068670371cdbd5b1a3d3c5dbecc83835a.

A file recreated by:

commit fa50bad9578cf32e6adcaf52c3a58c7b6cd81e30
Author: Christian Heimes <christian at cheimes.de>
Date:   Wed Mar 26 22:55:31 2008 +0000

    I forgot to svn add the future test

... I guess that it's related to:

commit 3c60833e1e53f6239825b44f76fa22172feb1790
Author: Christian Heimes <christian at cheimes.de>
Date:   Wed Mar 26 22:01:37 2008 +0000

    Patch #2477: Added from __future__ import unicode_literals
    The new PyParser_*Ex() functions are based on Neal's suggestion and initial patch. The new __future__ feature makes all '' and r'' unicode strings. b'' and br'' stay (byte) strings.

(Other candidates: commit 342212c52afd375d93f44f3ecda0914d77372f26 and commit 7f23d86107dfea69992322577c5033f2edbc3b4f.)

messages: 331080
nosy: pablogsal, vstinner
priority: normal
severity: normal
status: open
title: test_future4 ran no test
versions: Python 3.8

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list