]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/t/thelpers.py
Merge remote branch 'origin/master' into meta
[bup.git] / lib / bup / t / thelpers.py
index 89cccdaebad7214472c319e6206eb6854b209385..31ecbb9513c15a63b691ef80ab661b8d9859d53c 100644 (file)
@@ -1,4 +1,6 @@
+import math
 import os
+import bup._helpers as _helpers
 from bup.helpers import *
 from wvtest import *
 
@@ -12,6 +14,13 @@ def test_parse_num():
     WVPASSEQ(pn('1e+9 k'), 1000000000 * 1024)
     WVPASSEQ(pn('-3e-3mb'), int(-0.003 * 1024 * 1024))
 
+@wvtest
+def test_detect_fakeroot():
+    if os.getenv('FAKEROOTKEY'):
+        WVPASS(detect_fakeroot())
+    else:
+        WVPASS(not detect_fakeroot())
+
 @wvtest
 def test_strip_path():
     prefix = "/var/backup/daily.0/localhost"