[Python-modules-commits] [dulwich] 04/10: Remove racy check that relies on mtime changing between writes.

Jelmer Vernooij jelmer at moszumanska.debian.org
Sat Jan 14 20:35:22 UTC 2017


This is an automated email from the git hooks/post-receive script.

jelmer pushed a commit to branch master
in repository dulwich.

commit b5d7ab9610696c7c9031be15315658eabcde7323
Author: Jelmer Vernooij <jelmer at jelmer.uk>
Date:   Sat Jan 14 19:50:23 2017 +0000

    Remove racy check that relies on mtime changing between writes.
---
 NEWS                        | 5 +++++
 dulwich/tests/test_index.py | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 1939133..46dc58b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,10 @@
 0.16.3	UNRELEASED
 
+ TEST FIXES
+
+  * Remove racy check that relies on clock time changing between writes.
+   (Jelmer Vernooij)
+
 0.16.2	2016-01-14
 
  IMPROVEMENTS
diff --git a/dulwich/tests/test_index.py b/dulwich/tests/test_index.py
index b25d29b..24f6e4b 100644
--- a/dulwich/tests/test_index.py
+++ b/dulwich/tests/test_index.py
@@ -405,7 +405,8 @@ class BuildIndexTests(TestCase):
             build_index_from_tree(repo.path, repo.index_path(),
                                   repo.object_store, tree.id)
             sync()
-            self.assertNotEqual(mtime, os.stat(filea_path).st_mtime)
+            with open(filea_path, 'rb') as fh:
+                self.assertEqual(b'file a', fh.read())
 
 
     @skipIf(not getattr(os, 'symlink', None), 'Requires symlink support')

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/dulwich.git



More information about the Python-modules-commits mailing list