From 576483085c7357130afba7f605db431df255ec74 Mon Sep 17 00:00:00 2001 From: R David Murray Date: Thu, 24 Mar 2011 14:57:05 -0400 Subject: #11093: make NOTTESTS empty by renaming confusingly named files in test dir. Patch by Sandro Tosi. --- Lib/test/future_test1.py | 11 +++++++++++ Lib/test/future_test2.py | 10 ++++++++++ Lib/test/regrtest.py | 5 +---- Lib/test/test_future.py | 12 ++++++------ Lib/test/test_future1.py | 11 ----------- Lib/test/test_future2.py | 10 ---------- 6 files changed, 28 insertions(+), 31 deletions(-) create mode 100644 Lib/test/future_test1.py create mode 100644 Lib/test/future_test2.py delete mode 100644 Lib/test/test_future1.py delete mode 100644 Lib/test/test_future2.py diff --git a/Lib/test/future_test1.py b/Lib/test/future_test1.py new file mode 100644 index 0000000..297c2e0 --- /dev/null +++ b/Lib/test/future_test1.py @@ -0,0 +1,11 @@ +"""This is a test""" + +# Import the name nested_scopes twice to trigger SF bug #407394 (regression). +from __future__ import nested_scopes, nested_scopes + +def f(x): + def g(y): + return x + y + return g + +result = f(2)(4) diff --git a/Lib/test/future_test2.py b/Lib/test/future_test2.py new file mode 100644 index 0000000..3d7fc86 --- /dev/null +++ b/Lib/test/future_test2.py @@ -0,0 +1,10 @@ +"""This is a test""" + +from __future__ import nested_scopes; import site + +def f(x): + def g(y): + return x + y + return g + +result = f(2)(4) diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index ca9e9f4..f6cf0a7 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -743,10 +743,7 @@ STDTESTS = [ ] # set of tests that we don't want to be executed when using regrtest -NOTTESTS = { - 'test_future1', - 'test_future2', -} +NOTTESTS = set() def findtests(testdir=None, stdtests=STDTESTS, nottests=NOTTESTS): """Return a list of all applicable test modules.""" diff --git a/Lib/test/test_future.py b/Lib/test/test_future.py index c6689a1..3a25eb1 100644 --- a/Lib/test/test_future.py +++ b/Lib/test/test_future.py @@ -13,14 +13,14 @@ def get_error_location(msg): class FutureTest(unittest.TestCase): def test_future1(self): - support.unload('test_future1') - from test import test_future1 - self.assertEqual(test_future1.result, 6) + support.unload('future_test1') + from test import future_test1 + self.assertEqual(future_test1.result, 6) def test_future2(self): - support.unload('test_future2') - from test import test_future2 - self.assertEqual(test_future2.result, 6) + support.unload('future_test2') + from test import future_test2 + self.assertEqual(future_test2.result, 6) def test_future3(self): support.unload('test_future3') diff --git a/Lib/test/test_future1.py b/Lib/test/test_future1.py deleted file mode 100644 index 297c2e0..0000000 --- a/Lib/test/test_future1.py +++ /dev/null @@ -1,11 +0,0 @@ -"""This is a test""" - -# Import the name nested_scopes twice to trigger SF bug #407394 (regression). -from __future__ import nested_scopes, nested_scopes - -def f(x): - def g(y): - return x + y - return g - -result = f(2)(4) diff --git a/Lib/test/test_future2.py b/Lib/test/test_future2.py deleted file mode 100644 index 3d7fc86..0000000 --- a/Lib/test/test_future2.py +++ /dev/null @@ -1,10 +0,0 @@ -"""This is a test""" - -from __future__ import nested_scopes; import site - -def f(x): - def g(y): - return x + y - return g - -result = f(2)(4) -- cgit v0.12