@@ -32,17 +32,17 @@ class TestCLI(TempDirTest):
32
32
33
33
TEST_PATH = Path (__file__ ).parent .resolve ()
34
34
35
- @pytest .mark .skipif (LONG_TESTS () != 1 , reason = "No file downloads in short tests" )
35
+ @pytest .mark .skipif (not LONG_TESTS (), reason = "No file downloads in short tests" )
36
36
def setup_method (self ):
37
37
shutil .copyfile (DEB_FILE_PATH , Path (self .tempdir ) / "test.deb" )
38
38
download_file (CURL_7_20_0_URL , Path (self .tempdir ) / CURL_7_20_0_RPM )
39
39
40
- @pytest .mark .skipif (LONG_TESTS () != 1 , reason = "No file downloads in short tests" )
40
+ @pytest .mark .skipif (not LONG_TESTS (), reason = "No file downloads in short tests" )
41
41
def test_extract_curl_7_20_0 (self ):
42
42
"""Scanning curl-7.20.0"""
43
43
assert main (["cve-bin-tool" , "-l" , "debug" , "-x" , self .tempdir ]) != 0
44
44
45
- @pytest .mark .skipif (LONG_TESTS () != 1 , reason = "No file downloads in short tests" )
45
+ @pytest .mark .skipif (not LONG_TESTS (), reason = "No file downloads in short tests" )
46
46
def test_binary_curl_7_20_0 (self ):
47
47
"""Extracting from rpm and scanning curl-7.20.0"""
48
48
with Extractor () as ectx :
@@ -59,7 +59,7 @@ def test_binary_curl_7_20_0(self):
59
59
!= 0
60
60
)
61
61
62
- @pytest .mark .skipif (LONG_TESTS () != 1 , reason = "No file downloads in short tests" )
62
+ @pytest .mark .skipif (not LONG_TESTS (), reason = "No file downloads in short tests" )
63
63
def test_no_extraction (self ):
64
64
"""Test scanner against curl-7.20.0 rpm with extraction turned off"""
65
65
assert main (["cve-bin-tool" , str (Path (self .tempdir ) / CURL_7_20_0_RPM )]) != 0
@@ -80,7 +80,7 @@ def test_extract_bad_zip_messages(self, caplog):
80
80
main (["cve-bin-tool" , bad_zip_file ])
81
81
assert "Failure extracting" in caplog .text
82
82
83
- @pytest .mark .skipif (LONG_TESTS () != 1 , reason = "No file downloads in short tests" )
83
+ @pytest .mark .skipif (not LONG_TESTS (), reason = "No file downloads in short tests" )
84
84
def test_exclude (self , caplog ):
85
85
"""Test that the exclude paths are not scanned"""
86
86
test_path = Path (__file__ ).parent .resolve ()
@@ -153,7 +153,7 @@ def test_invalid_parameter(self):
153
153
main (["cve-bin-tool" , self .tempdir , "--bad-param;cat hi" ])
154
154
assert e .value .args [0 ] == ERROR_CODES [SystemExit ]
155
155
156
- @pytest .mark .skipif (LONG_TESTS () != 1 , reason = "Update flag tests are long tests" )
156
+ @pytest .mark .skipif (not LONG_TESTS (), reason = "Update flag tests are long tests" )
157
157
@pytest .mark .skipif (
158
158
sys .platform == "win32" , reason = "Causing failures in CI on windows only"
159
159
)
@@ -234,7 +234,7 @@ def test_runs(self, caplog):
234
234
main (["cve-bin-tool" , test_path , "-r" , "," .join (runs )])
235
235
self .check_checkers_log (caplog , skip_checkers , runs )
236
236
237
- @pytest .mark .skipif (LONG_TESTS () != 1 , reason = "Update flag tests are long tests" )
237
+ @pytest .mark .skipif (not LONG_TESTS (), reason = "Update flag tests are long tests" )
238
238
@pytest .mark .skipif (
239
239
sys .platform == "win32" , reason = "Causing failures in CI on windows only"
240
240
)
@@ -530,7 +530,7 @@ def test_SBOM(self, caplog):
530
530
"There are 1 products with known CVEs detected" ,
531
531
) in caplog .record_tuples
532
532
533
- @pytest .mark .skipif (LONG_TESTS () != 1 , reason = "Skipping long tests" )
533
+ @pytest .mark .skipif (not LONG_TESTS (), reason = "Skipping long tests" )
534
534
def test_console_output_depending_reportlab_existence (self , caplog ):
535
535
import subprocess
536
536
from importlib .machinery import ModuleSpec
0 commit comments