]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/t/txstat.py
txstat: fix for python 3
[bup.git] / lib / bup / t / txstat.py
index 64bad2de0eed71d0e8776dabe1831e5e1e9d3247..d002a36db3ad17ee9fb2fef5b380466041ef1dc1 100644 (file)
@@ -65,10 +65,10 @@ def test_bup_utimensat():
     if not xstat._bup_utimensat:
         return
     with no_lingering_errors():
-        with test_tempdir('bup-txstat-') as tmpdir:
-            path = tmpdir + '/foo'
+        with test_tempdir(b'bup-txstat-') as tmpdir:
+            path = tmpdir + b'/foo'
             open(path, 'w').close()
-            frac_ts = (0, 10**9 / 2)
+            frac_ts = (0, 10**9 // 2)
             xstat._bup_utimensat(_helpers.AT_FDCWD, path, (frac_ts, frac_ts), 0)
             st = _helpers.stat(path)
             atime_ts = st[8]
@@ -84,10 +84,10 @@ def test_bup_utimes():
     if not xstat._bup_utimes:
         return
     with no_lingering_errors():
-        with test_tempdir('bup-txstat-') as tmpdir:
-            path = tmpdir + '/foo'
+        with test_tempdir(b'bup-txstat-') as tmpdir:
+            path = tmpdir + b'/foo'
             open(path, 'w').close()
-            frac_ts = (0, 10**6 / 2)
+            frac_ts = (0, 10**6 // 2)
             xstat._bup_utimes(path, (frac_ts, frac_ts))
             st = _helpers.stat(path)
             atime_ts = st[8]
@@ -103,10 +103,10 @@ def test_bup_lutimes():
     if not xstat._bup_lutimes:
         return
     with no_lingering_errors():
-        with test_tempdir('bup-txstat-') as tmpdir:
-            path = tmpdir + '/foo'
+        with test_tempdir(b'bup-txstat-') as tmpdir:
+            path = tmpdir + b'/foo'
             open(path, 'w').close()
-            frac_ts = (0, 10**6 / 2)
+            frac_ts = (0, 10**6 // 2)
             xstat._bup_lutimes(path, (frac_ts, frac_ts))
             st = _helpers.stat(path)
             atime_ts = st[8]