summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_warnings.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-11-03 19:31:18 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-11-03 19:31:18 (GMT)
commit79080686274f87d7110c5150ee6c31de5dc3c5db (patch)
tree0b5701193b462ad2e923148c2d5ee23ee895b270 /Lib/test/test_warnings.py
parent834856aca9ebd28d314a8d963b193f9d8176a956 (diff)
downloadcpython-79080686274f87d7110c5150ee6c31de5dc3c5db.zip
cpython-79080686274f87d7110c5150ee6c31de5dc3c5db.tar.gz
cpython-79080686274f87d7110c5150ee6c31de5dc3c5db.tar.bz2
Issue #18702: All skipped tests now reported as skipped.
Diffstat (limited to 'Lib/test/test_warnings.py')
-rw-r--r--Lib/test/test_warnings.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_warnings.py b/Lib/test/test_warnings.py
index 464ff40..9f6d775 100644
--- a/Lib/test/test_warnings.py
+++ b/Lib/test/test_warnings.py
@@ -271,11 +271,10 @@ class WarnTests(BaseTest):
finally:
warning_tests.__file__ = filename
+ @unittest.skipUnless(hasattr(sys, 'argv'), 'test needs sys.argv')
def test_missing_filename_main_with_argv(self):
# If __file__ is not specified and the caller is __main__ and sys.argv
# exists, then use sys.argv[0] as the file.
- if not hasattr(sys, 'argv'):
- return
filename = warning_tests.__file__
module_name = warning_tests.__name__
try: