Browse Source

Fix windows path errors in tests.

Antti Aalto 9 years ago
parent
commit
d49f3e34c1
2 changed files with 4 additions and 0 deletions
  1. 1 0
      src/borg/testsuite/archiver.py
  2. 3 0
      src/borg/testsuite/shellpattern.py

+ 1 - 0
src/borg/testsuite/archiver.py

@@ -601,6 +601,7 @@ class ArchiverTestCase(ArchiverTestCaseBase):
                      '--exclude=re:file(\\d)\\1\\1$', self.repository_location + '::test')
         self.assert_equal(sorted(os.listdir('output/input')), ['file3'])
 
+    @pytest.mark.skipif(sys.platform == 'win32', reason='Can not test on Windows.')
     def test_extract_include_exclude_regex_from_file(self):
         self.cmd('init', self.repository_location)
         self.create_regular_file('file1', size=1024 * 80)

+ 3 - 0
src/borg/testsuite/shellpattern.py

@@ -1,4 +1,5 @@
 import re
+import sys
 
 import pytest
 
@@ -71,6 +72,7 @@ def check(path, pattern):
     ("foo^", ["foo[^!]"]),
     ("foo!", ["foo[^!]"]),
     ])
+@pytest.mark.skipif(sys.platform == 'win32', reason='Need to use os.path.sep')
 def test_match(path, patterns):
     for p in patterns:
         assert check(path, p)
@@ -108,6 +110,7 @@ def test_match(path, patterns):
     ("foo1", ["foo[!12]"]),
     ("foo2", ["foo[!12]"]),
     ])
+@pytest.mark.skipif(sys.platform == 'win32', reason='Need to use os.path.sep')
 def test_mismatch(path, patterns):
     for p in patterns:
         assert not check(path, p)