test: itemize f+/f-
This commit is contained in:
@@ -3,3 +3,5 @@ addopts = --strict-markers -m "not validate_targets"
|
|||||||
markers =
|
markers =
|
||||||
online: mark tests are requiring internet access.
|
online: mark tests are requiring internet access.
|
||||||
validate_targets: mark tests for sweeping manifest validation (sends many requests).
|
validate_targets: mark tests for sweeping manifest validation (sends many requests).
|
||||||
|
validate_targets_fp: validate_targets, false positive tests only.
|
||||||
|
validate_targets_fn: validate_targets, false negative tests only.
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ def false_negative_check(sites_info: dict[str, dict[str, str]], site: str) -> Qu
|
|||||||
@pytest.mark.online
|
@pytest.mark.online
|
||||||
class Test_All_Targets:
|
class Test_All_Targets:
|
||||||
|
|
||||||
|
@pytest.mark.validate_targets_fp
|
||||||
def test_manifest_false_pos(self, chunked_sites: dict[str, dict[str, str]]):
|
def test_manifest_false_pos(self, chunked_sites: dict[str, dict[str, str]]):
|
||||||
"""Iterate through all sites in the manifest to discover possible false-positive inducting targets."""
|
"""Iterate through all sites in the manifest to discover possible false-positive inducting targets."""
|
||||||
pattern: str
|
pattern: str
|
||||||
@@ -69,6 +70,7 @@ class Test_All_Targets:
|
|||||||
result: QueryStatus = false_positive_check(chunked_sites, site, pattern)
|
result: QueryStatus = false_positive_check(chunked_sites, site, pattern)
|
||||||
assert result is QueryStatus.AVAILABLE, f"{site} produced false positive with pattern {pattern}, result was {result}"
|
assert result is QueryStatus.AVAILABLE, f"{site} produced false positive with pattern {pattern}, result was {result}"
|
||||||
|
|
||||||
|
@pytest.mark.validate_targets_fn
|
||||||
def test_manifest_false_neg(self, chunked_sites: dict[str, dict[str, str]]):
|
def test_manifest_false_neg(self, chunked_sites: dict[str, dict[str, str]]):
|
||||||
"""Iterate through all sites in the manifest to discover possible false-negative inducting targets."""
|
"""Iterate through all sites in the manifest to discover possible false-negative inducting targets."""
|
||||||
for site in chunked_sites:
|
for site in chunked_sites:
|
||||||
|
|||||||
Reference in New Issue
Block a user