This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Add skip_on_windows decorator to test.support
Type: enhancement Stage: patch review
Components: Tests Versions: Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, ezio.melotti, r.david.murray, vstinner, zach.ware
Priority: normal Keywords: patch

Created on 2013-04-07 16:47 by berker.peksag, last changed 2022-04-11 14:57 by admin.

Files
File name Uploaded Description Edit
skip_on_windows.diff berker.peksag, 2013-04-07 16:47 review
issue17652_v2.diff berker.peksag, 2013-04-27 13:01 review
Messages (6)
msg186226 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2013-04-07 16:47
I saw a conversation about adding a @skip_on_windows decorator on #python-dev a couple of months ago.

Attached a patch with a documentation update.

(Added the participants of the conversation to nosy list.)
msg186518 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2013-04-10 16:46
Could you also propose places in the test to use this? If we're going to add it, we should use it.
msg187905 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2013-04-27 13:01
> Could you also propose places in the test to use this?

Sure.

- Lib/test/test_py_compile.py
- Lib/test/test_cmd_line.py
- Lib/test/test_faulthandler.py
- Lib/test/test_subprocess.py
- Lib/test/test_fileio.py
- Lib/test/test_io.py
- Lib/test/test_logging.py
- Lib/test/test_uuid.py
- Lib/test/datetimetester.py
- Lib/test/test_glob.py
- Lib/test/test_import.py
- Lib/test/test_multiprocessing.py
- Lib/test/test_signal.py
- Lib/test/test_site.py
- Lib/test/test_sysconfig.py

Here's an alternative patch that adds an optional "reason" parameter.
msg222307 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-04 19:04
I like the idea and the patch looks clean so can we have a commit review please.
msg222391 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-07-06 04:05
The patch looks fine, but I don't see a big gain from it; call me +0.  It might be interesting to see a patch that converts current "@skipIf(sys.platform == 'win32' or os.name == 'nt')" instances to "@skip_on_windows" to see just what kind of difference it makes, but I'm honestly more interested in seeing how many different ways "don't run this test on Windows" is spelled currently.
msg222509 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-07-07 20:09
"""It might be interesting to see a patch that converts current "@skipIf(sys.platform == 'win32' or os.name == 'nt')" instances to "@skip_on_windows" to see just what kind of difference it makes, but I'm honestly more interested in seeing how many different ways "don't run this test on Windows" is spelled currently."""

I agree. Berker: are you interested to work on such patch?
History
Date User Action Args
2022-04-11 14:57:43adminsetgithub: 61852
2019-04-26 18:33:24BreamoreBoysetnosy: - BreamoreBoy
2014-07-07 20:09:04vstinnersetnosy: + vstinner
messages: + msg222509
2014-07-06 04:05:54zach.waresetmessages: + msg222391
2014-07-05 06:38:01berker.peksagsetnosy: + zach.ware
2014-07-04 22:29:21brian.curtinsetnosy: - brian.curtin
2014-07-04 19:04:47BreamoreBoysetnosy: + BreamoreBoy

messages: + msg222307
versions: + Python 3.5, - Python 3.4
2013-04-27 13:01:07berker.peksagsetfiles: + issue17652_v2.diff

messages: + msg187905
2013-04-10 16:46:48brian.curtinsetmessages: + msg186518
2013-04-10 16:44:44ezio.melottisetnosy: + brian.curtin

type: enhancement
stage: patch review
2013-04-07 16:47:15berker.peksagcreate