diff tests/test-filecache.py @ 31216:21fa3d3688f3

vfs: replace 'scmutil.opener' usage with 'scmutil.vfs' The 'vfs' class is the first class citizen for years. We remove all usages of the older API. This will let us remove the old API eventually.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Thu, 02 Mar 2017 03:52:36 +0100
parents d83ca854fa21
children 34d57ddaf9f2
line wrap: on
line diff
--- a/tests/test-filecache.py	Tue Mar 07 12:52:00 2017 -0800
+++ b/tests/test-filecache.py	Thu Mar 02 03:52:36 2017 +0100
@@ -73,7 +73,7 @@
     # atomic replace file, size doesn't change
     # hopefully st_mtime doesn't change as well so this doesn't use the cache
     # because of inode change
-    f = scmutil.opener('.')('x', 'w', atomictemp=True)
+    f = scmutil.vfs('.')('x', 'w', atomictemp=True)
     f.write('b')
     f.close()
 
@@ -97,7 +97,7 @@
     # should recreate the object
     repo.cached
 
-    f = scmutil.opener('.')('y', 'w', atomictemp=True)
+    f = scmutil.vfs('.')('y', 'w', atomictemp=True)
     f.write('B')
     f.close()
 
@@ -105,10 +105,10 @@
     print("* file y changed inode")
     repo.cached
 
-    f = scmutil.opener('.')('x', 'w', atomictemp=True)
+    f = scmutil.vfs('.')('x', 'w', atomictemp=True)
     f.write('c')
     f.close()
-    f = scmutil.opener('.')('y', 'w', atomictemp=True)
+    f = scmutil.vfs('.')('y', 'w', atomictemp=True)
     f.write('C')
     f.close()