From 714370fad11524158669a1307eed40f298eaf620 Mon Sep 17 00:00:00 2001 From: "Eric V. Smith" Date: Sun, 24 Jun 2012 19:55:18 -0400 Subject: Give test directory a more reasonable name. --- Lib/test/namespace_pkgs/module_and_file/a_test.py | 1 - Lib/test/namespace_pkgs/module_and_file/a_test/empty | 0 Lib/test/namespace_pkgs/module_and_namespace_package/a_test.py | 1 + Lib/test/namespace_pkgs/module_and_namespace_package/a_test/empty | 0 Lib/test/test_namespace_pkgs.py | 6 ++++-- Makefile.pre.in | 4 ++-- 6 files changed, 7 insertions(+), 5 deletions(-) delete mode 100644 Lib/test/namespace_pkgs/module_and_file/a_test.py delete mode 100644 Lib/test/namespace_pkgs/module_and_file/a_test/empty create mode 100644 Lib/test/namespace_pkgs/module_and_namespace_package/a_test.py create mode 100644 Lib/test/namespace_pkgs/module_and_namespace_package/a_test/empty diff --git a/Lib/test/namespace_pkgs/module_and_file/a_test.py b/Lib/test/namespace_pkgs/module_and_file/a_test.py deleted file mode 100644 index 43cbedb..0000000 --- a/Lib/test/namespace_pkgs/module_and_file/a_test.py +++ /dev/null @@ -1 +0,0 @@ -attr = 'in module' diff --git a/Lib/test/namespace_pkgs/module_and_file/a_test/empty b/Lib/test/namespace_pkgs/module_and_file/a_test/empty deleted file mode 100644 index e69de29..0000000 diff --git a/Lib/test/namespace_pkgs/module_and_namespace_package/a_test.py b/Lib/test/namespace_pkgs/module_and_namespace_package/a_test.py new file mode 100644 index 0000000..43cbedb --- /dev/null +++ b/Lib/test/namespace_pkgs/module_and_namespace_package/a_test.py @@ -0,0 +1 @@ +attr = 'in module' diff --git a/Lib/test/namespace_pkgs/module_and_namespace_package/a_test/empty b/Lib/test/namespace_pkgs/module_and_namespace_package/a_test/empty new file mode 100644 index 0000000..e69de29 diff --git a/Lib/test/test_namespace_pkgs.py b/Lib/test/test_namespace_pkgs.py index 7ad511f..6693d64 100644 --- a/Lib/test/test_namespace_pkgs.py +++ b/Lib/test/test_namespace_pkgs.py @@ -276,10 +276,12 @@ class ZipWithMissingDirectory(NamespacePackageTest): self.assertEqual(bar.two.attr, 'missing_directory foo two') -class ModuleAndFileInSameDir(NamespacePackageTest): - paths = ['module_and_file'] +class ModuleAndNamespacePackageInSameDir(NamespacePackageTest): + paths = ['module_and_namespace_package'] def test_module_before_namespace_package(self): + # Make sure we find the module in preference to the + # namespace package. import a_test self.assertEqual(a_test.attr, 'in module') diff --git a/Makefile.pre.in b/Makefile.pre.in index 916cb8e..bfa818b 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -991,8 +991,8 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \ test/namespace_pkgs/project3 \ test/namespace_pkgs/project3/parent \ test/namespace_pkgs/project3/parent/child \ - test/namespace_pkgs/module_and_file \ - test/namespace_pkgs/module_and_file/a_test \ + test/namespace_pkgs/module_and_namespace_package \ + test/namespace_pkgs/module_and_namespace_package/a_test \ collections concurrent concurrent/futures encodings \ email email/mime test/test_email test/test_email/data \ html json test/json_tests http dbm xmlrpc \ -- cgit v0.12