[pypy-commit] pypy py3.5: Update from feedback

arigo pypy.commits at gmail.com
Wed Apr 12 10:17:48 EDT 2017


Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r91043:a25d530e6773
Date: 2017-04-12 16:17 +0200
http://bitbucket.org/pypy/pypy/changeset/a25d530e6773/

Log:	Update from feedback

diff --git a/lib-python/3/test/test_pathlib.py b/lib-python/3/test/test_pathlib.py
--- a/lib-python/3/test/test_pathlib.py
+++ b/lib-python/3/test/test_pathlib.py
@@ -1768,7 +1768,6 @@
                     os.mkdir(path, mode)      # from another process
                     concurrently_created.add(path)
                 os.mkdir(path, mode)          # our real call
-            org_mkdir = pathlib._normal_accessor.mkdir
 
             pattern = [bool(pattern_num & (1 << n)) for n in range(5)]
             concurrently_created = set()
@@ -1776,10 +1775,10 @@
             try:
                 with mock.patch("pathlib._normal_accessor.mkdir", my_mkdir):
                     p12.mkdir(parents=True, exist_ok=False)
-                got_exception = False
             except FileExistsError:
-                got_exception = True
-            self.assertEqual(str(p12) in concurrently_created, got_exception)
+                self.assertIn(str(p12), concurrently_created)
+            else:
+                self.assertNotIn(str(p12), concurrently_created)
             self.assertTrue(p.exists())
 
     @with_symlinks


More information about the pypy-commit mailing list