Skip to content

Commit 19460af

Browse files
committed
Do not use files with colon in name
This is not valid on Window and therefore thre git repo cannot be cloned. Instead use an archive and skip tests using such files on Windows Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent f2f763e commit 19460af

File tree

6 files changed

+7
-33
lines changed

6 files changed

+7
-33
lines changed
776 Bytes
Binary file not shown.

tests/packagedcode/data/debian/end-to-end/libncurses5:amd64.md5sums

Lines changed: 0 additions & 4 deletions
This file was deleted.

tests/packagedcode/data/debian/end-to-end/status

Lines changed: 0 additions & 20 deletions
This file was deleted.
439 Bytes
Binary file not shown.

tests/packagedcode/data/debian/same-multi-arch/libatk-adaptor:amd64.md5sums

Lines changed: 0 additions & 6 deletions
This file was deleted.

tests/packagedcode/test_debian.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,11 @@ def test_parse_status_file_perl_error(self):
7676
packages = list(debian.parse_status_file(test_file, distro='debian'))
7777
self.check_packages(packages, expected_loc, regen=False)
7878

79+
@skipIf(on_windows, 'File names cannot contain colons on Windows')
7980
def test_parse_end_to_end(self):
80-
test_file = self.get_test_loc('debian/end-to-end/status')
81-
test_info_dir = self.get_test_loc('debian/end-to-end/')
81+
test_dir = self.extract_test_tar('debian/end-to-end.tgz')
82+
test_info_dir = os.path.join(test_dir, 'end-to-end')
83+
test_file = os.path.join(test_info_dir, 'status')
8284

8385
packages = list(debian.parse_status_file(test_file, distro='ubuntu'))
8486
assert 1 == len(packages)
@@ -120,8 +122,10 @@ def test_missing_md5sum_file(self):
120122

121123
assert [] == test_pkg.get_list_of_installed_files(test_info_dir)
122124

125+
@skipIf(on_windows, 'File names cannot contain colons on Windows')
123126
def test_multi_arch_is_same(self):
124-
test_info_dir = self.get_test_loc('debian/same-multi-arch')
127+
test_dir = self.extract_test_tar('debian/same-multi-arch.tgz')
128+
test_info_dir = os.path.join(test_dir, 'same-multi-arch')
125129

126130
test_pkg = debian.DebianPackage(
127131
name='libatk-adaptor',

0 commit comments

Comments
 (0)