[Python-checkins] bpo-35519: Rename test.bisect to test.bisect_cmd (GH-11200)

Miss Islington (bot) webhook-mailer at python.org
Mon Dec 17 16:24:57 EST 2018


https://github.com/python/cpython/commit/05dfa0cc96f6b72b1e72f57b1b5f4b37764a382d
commit: 05dfa0cc96f6b72b1e72f57b1b5f4b37764a382d
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-12-17T13:24:52-08:00
summary:

bpo-35519: Rename test.bisect to test.bisect_cmd (GH-11200)


Rename test.bisect module to test.bisect_cmd to avoid conflict with
bisect module when running directly a test like
"./python Lib/test/test_xmlrpc.py".
(cherry picked from commit 1dd035954bb03c41b954ebbd63969b4bcb0e106e)

Co-authored-by: Victor Stinner <vstinner at redhat.com>

files:
A Lib/test/bisect_cmd.py
A Misc/NEWS.d/next/Tests/2018-12-17-16-41-45.bpo-35519.RR3L_w.rst
D Lib/test/bisect.py
M Lib/test/support/__init__.py

diff --git a/Lib/test/bisect.py b/Lib/test/bisect_cmd.py
similarity index 100%
rename from Lib/test/bisect.py
rename to Lib/test/bisect_cmd.py
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index fd7fb2cc1702..25c05edad340 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -1946,7 +1946,7 @@ def set_match_tests(patterns):
         patterns = ()
     elif all(map(_is_full_match_test, patterns)):
         # Simple case: all patterns are full test identifier.
-        # The test.bisect utility only uses such full test identifiers.
+        # The test.bisect_cmd utility only uses such full test identifiers.
         func = set(patterns).__contains__
     else:
         regex = '|'.join(map(fnmatch.translate, patterns))
diff --git a/Misc/NEWS.d/next/Tests/2018-12-17-16-41-45.bpo-35519.RR3L_w.rst b/Misc/NEWS.d/next/Tests/2018-12-17-16-41-45.bpo-35519.RR3L_w.rst
new file mode 100644
index 000000000000..e108dd877e1b
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2018-12-17-16-41-45.bpo-35519.RR3L_w.rst
@@ -0,0 +1,3 @@
+Rename :mod:`test.bisect` module to :mod:`test.bisect_cmd` to avoid conflict
+with :mod:`bisect` module when running directly a test like
+``./python Lib/test/test_xmlrpc.py``.



More information about the Python-checkins mailing list