Commit Graph

77 Commits

Author SHA1 Message Date
Stéphane Wirtel a40681dd5d bpo-36019: Use pythontest.net instead of example.com in network tests (GH-11941) 2019-02-22 14:45:36 +01:00
Serhiy Storchaka e7a4bb554e
bpo-35798: Add test.support.check_syntax_warning(). (#11895)
It checks that a SyntaxWarning is raised when compile specified
statement, that it is raised only once, that it is converted to
a SyntaxError when raised as exception, and that both warning and
exception objects have corresponding attributes.
2019-02-19 08:30:15 +02:00
Stéphane Wirtel 12e696b4f0 bpo-35042: Use the :pep: role where a PEP is specified (#10036) 2018-10-26 15:58:26 -07:00
Andrés Delfino 271818fe27 Fix "Python" casing in a few places (GH-9001) 2018-09-14 10:13:09 -07:00
Ville Skyttä 61f82e0e33 Spelling fixes to docs, docstrings, and comments (GH-6374) 2018-04-20 16:08:45 -04:00
Serhiy Storchaka bac2d5ba30
Fix duplicating words words. (GH-6296)
Most of them have been added in 3.7.
2018-03-28 22:14:26 +03:00
Nick Coghlan d5d9e02dd3
bpo-33053: -m now adds *starting* directory to sys.path (GH-6231)
Historically, -m added the empty string as sys.path
zero, meaning it resolved imports against the current
working directory, the same way -c and the interactive
prompt do.

This changes the sys.path initialisation to add the
*starting* working directory as sys.path[0] instead,
such that changes to the working directory while the
program is running will have no effect on imports
when using the -m switch.
2018-03-25 23:03:10 +10:00
Serhiy Storchaka b21d155f57
bpo-32964: Reuse a testing implementation of the path protocol in tests. (#5930) 2018-03-02 11:53:51 +02:00
Cheryl Sabella 988fb28431 bpo-11015: Update test.support documentation (GH-5610) 2018-02-11 23:10:42 +10:00
Daisuke Miyakawa 0e61e67a57 bpo-31567: add or fix decorator markup in docs (#3959) 2017-10-12 10:39:43 -04:00
Stefan Grönke f1502d097c bpo-31569: correct PCBuild/ case to PCbuild/ in build scripts and docs (GH-3711) 2017-09-25 17:58:10 +01:00
Louie Lu 7fae81e167 Fix trailing colon and newline in test.rst (#1250) 2017-04-22 09:46:18 +03:00
Serhiy Storchaka 989db5c880 Issue #19795: Mark up None as literal text. 2016-10-19 16:37:13 +03:00
Serhiy Storchaka ecf41da83e Issue #19795: Mark up None as literal text. 2016-10-19 16:29:26 +03:00
Terry Jan Reedy 4da945f361 Merge Issue #22558. 2016-06-11 15:06:08 -04:00
Terry Jan Reedy fa089b9b0b Issue #22558: Add remaining doc links to source code for Python-coded modules.
Reformat header above separator line (added if missing) to a common format.
Patch by Yoni Lavi.
2016-06-11 15:02:54 -04:00
Martin Panter abe4d52a1a Merge doc and comment fixes from 3.5 2016-04-19 23:23:16 +00:00
Martin Panter 8f26565ba9 Fix spelling (inital), grammar (may translates) in documentation, comments 2016-04-19 04:03:41 +00:00
Georg Brandl 3902d62c4e merge with 3.5 2016-02-26 19:37:52 +01:00
Georg Brandl 5d94134040 Closes #25910: fix dead and permanently redirected links in the docs. Thanks to SilentGhost for the patch. 2016-02-26 19:37:12 +01:00
Martin Panter d226d308a3 Issue #23883: Add test.support.check__all__() and test gettext.__all__
Patches by Jacek Kołodziej.
2015-11-14 11:47:00 +00:00
Martin Panter 3f930dcd87 Merge typo fixes from 3.4 into 3.5 2015-10-07 11:01:47 +00:00
Martin Panter 9955a373a8 Various minor typos in documentation and comments 2015-10-07 10:26:23 +00:00
Zachary Ware 3d3aedc8ba Fix usage of the default role. 2015-07-07 00:07:25 -05:00
Gregory P. Smith 7c63fd3df5 issue9859: add the missing versionadded tag to the documentation. 2015-04-14 15:25:01 -07:00
Gregory P. Smith 4e72cceb62 issue9859: Document test.support.detect_api_mismatch() and simplify its test. 2015-04-14 13:26:06 -07:00
Georg Brandl 93a56cdc37 Doc: fix default role usage (except in unittest mock docs) 2014-10-30 22:25:41 +01:00
Zachary Ware f012ba42fe Issue #22002: Make full use of test discovery in test sub-packages.
Adds `load_package_tests` function to test.support, uses it in test_asyncio,
test_email, test_json, test_tools, test_importlib and all test_importlib
sub-packages to implement test discovery.
2014-07-23 12:00:29 -05:00
Georg Brandl 6b4c847c4f Doc: fix default role usage (except in unittest mock docs) 2014-10-30 22:26:26 +01:00
Larry Hastings 3732ed2414 Merge in all documentation changes since branching 3.4.0rc1. 2014-03-15 21:13:56 -07:00
Antoine Pitrou 77e904e6a6 Issue #18948: improve SuppressCoreFiles to include Windows crash popup suppression, and use it in more tests.
Patch by Valerie Lambert and Zachary Ware.
2013-10-08 23:04:32 +02:00
Nick Coghlan 0494c2ae7f Close #18952: correctly download test support data
When test.support was converted to a package, it started silently
skipping the tests which needed to download support data to run.

This change refactors the affected code, and also tidies up
test.support.findfile to remove the unused *here* parameter, document
the *subdir* parameter and rename the *filename* parameter to avoid
shadowing the file builtin and be consistent with the documentation.

The unexpected skips were noticed and reported by Zachary Ware
2013-09-08 11:40:34 +10:00
Eli Bendersky ba5517d4c0 Issue #12645: Clarify and reformat the documentation of import_fresh_module 2013-08-11 15:38:08 -07:00
Nick Coghlan 5517596c04 Close #15415: Factor out temp dir helpers to test.support
Patch by Chris Jerdonek
2013-07-28 22:11:50 +10:00
R David Murray 5a33f81348 #17987: properly document support.captured_xxx.
Patch by Dmi Baranov.
2013-07-11 12:28:40 -04:00
Ezio Melotti 25a404520d #11732: add a new suppress_crash_popup() context manager to test.support. 2013-03-05 20:26:17 +02:00
Benjamin Peterson 5d50adee50 StringIO.StringIO -> io.StringIO (closes #17168) 2013-02-09 08:57:28 -05:00
Sandro Tosi f0c10f0840 Issue #14554: merge with 3.2 2012-04-24 18:39:53 +02:00
Sandro Tosi 3e29d93007 Issue #14554: correct example for captured_stdout(); patch by Tshepang Lekhonkhobe 2012-04-24 18:39:24 +02:00
R David Murray df7ac06195 Merge doc fixes #14553 and #14552. 2012-04-11 20:15:10 -04:00
R David Murray 644cabed4b #14552: remove redundant wording in 'test' docs.
Original patch by Tshepang Lekhonkhobe.
2012-04-11 20:11:53 -04:00
R David Murray f1cdb6086d Reflow paragraph (not that it helped much). 2012-04-09 09:12:57 -04:00
R David Murray 78fc25c77f #14533: if a test has no test_main, use loadTestsFromModule.
This moves us further in the direction of using normal unittest facilities
instead of specialized regrtest ones.  Any test module that can be correctly
run currently using 'python unittest -m test.test_xxx' can now be converted to
use normal unittest test loading by simply deleting its test_main, thus no
longer requiring manual maintenance of the list of tests to run.  (Not all
tests can be converted that easily, since test_main sometimes does some
additional things (such as reap_children or reap_threads).  In those cases the
extra code may be moved to setUpModule/tearDownModule methods, or perhaps the
same ends can be achieved in a different way, such as moving the decorators to
the test classes that need them, etc.)

I don't advocate going through and making this change wholesale, but any time
a list of tests in test_main would otherwise need to be updated, consideration
should instead be given to deleting test_main.
2012-04-09 08:55:42 -04:00
Nick Coghlan 2496f331a7 Close issue 12958 by flagging expected failures in test_socket on Mac OS X 2011-09-19 20:26:31 +10:00
Georg Brandl 39112a9643 Merge with 3.2. 2011-07-30 09:01:03 +02:00
Georg Brandl eea6cda91a Change test.support docs to be more specific about the nature of this module. 2011-07-30 09:00:48 +02:00
Eli Bendersky c353f68b1d fix doc typo for library/test.rst 2011-07-27 20:29:59 +03:00
Eli Bendersky e168965bd0 Issue #11015: bring test.support docs up to date 2011-05-06 09:29:27 +03:00
Antoine Pitrou 197c9c945e Make this a note again. 2010-12-18 12:33:06 +00:00
Éric Araujo 1d55c7ea9b Advertise “python -m test” over test.regrtest (r87296 followup) 2010-12-16 01:40:26 +00:00