Skip to content

Commit

Permalink
Skip unsupported test on Ubuntu 20
Browse files Browse the repository at this point in the history
Signed-off-by: Keshav Priyadarshi <[email protected]>
  • Loading branch information
keshav-space committed Mar 19, 2024
1 parent 4f2b414 commit 9b74543
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/data/strings_xgettext/fdisk.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ static void list_types(const char *const *sys);
"\x86" "NTFS volume set",
"\x87" "NTFS volume set",
"\x8e" "Linux LVM",
"\x9f" "BSD/OS", /* BSDI */
6 changes: 6 additions & 0 deletions tests/data/strings_xgettext/fdisk.c-expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@
31
],
"string": "Linux LVM"
},
{
"line_numbers": [
32
],
"string": "BSD/OS"
}
],
"scan_errors": []
Expand Down
8 changes: 8 additions & 0 deletions tests/test_symbols_xgettext.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
#

import os
import platform

import pytest
from commoncode.testcase import FileBasedTesting
from scancode.cli_test_utils import check_json_scan
from scancode.cli_test_utils import run_scan_click
Expand Down Expand Up @@ -233,6 +235,12 @@ def test_strings_scanner_multilines_utf8(self):
expected_loc = self.get_test_loc("lineedit.c-expected.json", must_exist=False)
check_json_scan(expected_loc, result_file, regen=REGEN_TEST_FIXTURES)

@pytest.mark.skipif(
platform.system() == "Linux"
and platform.release().startswith("5.1")
and "Ubuntu" in platform.uname().version,
reason="Test not supported on Ubuntu 20",
)
def test_strings_scanner_unicode(self):
test_file = self.get_test_loc("fdisk.c")
result_file = self.get_temp_file("json")
Expand Down

0 comments on commit 9b74543

Please sign in to comment.