[Python-checkins] cpython (merge 3.5 -> default): Merge 3.5
victor.stinner
python-checkins at python.org
Mon Jul 20 17:13:44 CEST 2015
https://hg.python.org/cpython/rev/350e18d4ce84
changeset: 96963:350e18d4ce84
parent: 96960:3f2c12c0abdb
parent: 96962:0bb44313842a
user: Victor Stinner <victor.stinner at gmail.com>
date: Mon Jul 20 17:13:28 2015 +0200
summary:
Merge 3.5
files:
Lib/test/test_os.py | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -429,12 +429,18 @@
with open(self.fname, 'wb') as fp:
fp.write(b"ABC")
+ def restore_float_times(state):
+ with warnings.catch_warnings():
+ warnings.simplefilter("ignore", DeprecationWarning)
+
+ os.stat_float_times(state)
+
# ensure that st_atime and st_mtime are float
with warnings.catch_warnings():
warnings.simplefilter("ignore", DeprecationWarning)
- old_state = os.stat_float_times(-1)
- self.addCleanup(os.stat_float_times, old_state)
+ old_float_times = os.stat_float_times(-1)
+ self.addCleanup(restore_float_times, old_float_times)
os.stat_float_times(True)
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list