-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
[2.7] bpo-30223: Add Lib/test/__main__.py. #1373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
To unify running tests in Python 2.7 and Python 3, the test package can be run as a script. This is equivalent to running the test.regrtest module as a script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested your change, and it doesn't work.
Did you forget to include Lib/test/main.py as mentioned in the commit title?
@@ -195,7 +199,7 @@ tests. | |||
.. note:: | |||
|
|||
The :mod:`test.test_support` module has been renamed to :mod:`test.support` | |||
in Python 3.x and 2.7.13. The name ``test.test_support`` has been retained | |||
in Python 3.x and 2.7.14. The name ``test.test_support`` has been retained |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is ok: the commit a694e09 is not part of Python 2.7.13.
(Maybe it's time to backport test_regrtest.py :-) It's up to you, just add main.py and it will be ok.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Add missed Lib/test/main.py."
Ah, it's now better: it works ;-)
test_regrtest.py mainly tests regrtest._parse_args() which doesn't exist in 2.7. It was added when regrtest was switched from using getopt to using argparse. This was a large change. |
test_regrtest.py mainly tests regrtest._parse_args() which doesn't exist in 2.7.
test_regrtest contains many tests which make sense for Python 2.7, but it was just an idea and I don't think that it matters. regrtest isn't going to change deeply in Python 2.7.
|
To unify running tests in Python 2.7 and Python 3, the test
package can be run as a script. This is equivalent to running the
test.regrtest module as a script.