[Python-checkins] cpython (merge 3.5 -> default): Merge with 3.5
terry.reedy
python-checkins at python.org
Mon Sep 5 00:02:05 EDT 2016
https://hg.python.org/cpython/rev/ffc915a55a72
changeset: 103037:ffc915a55a72
parent: 103033:8e9d3a5d47d5
parent: 103036:756c27efe193
user: Terry Jan Reedy <tjreedy at udel.edu>
date: Mon Sep 05 00:01:47 2016 -0400
summary:
Merge with 3.5
files:
Lib/test/support/__init__.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -466,6 +466,7 @@
try:
from tkinter import Tk
root = Tk()
+ root.withdraw()
root.update()
root.destroy()
except Exception as e:
@@ -490,12 +491,12 @@
def requires(resource, msg=None):
"""Raise ResourceDenied if the specified resource is not available."""
- if resource == 'gui' and not _is_gui_available():
- raise ResourceDenied(_is_gui_available.reason)
if not is_resource_enabled(resource):
if msg is None:
msg = "Use of the %r resource not enabled" % resource
raise ResourceDenied(msg)
+ if resource == 'gui' and not _is_gui_available():
+ raise ResourceDenied(_is_gui_available.reason)
def _requires_unix_version(sysname, min_version):
"""Decorator raising SkipTest if the OS is `sysname` and the version is less
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list