diff --git a/pkgs/development/python-modules/cyclonedx-python-lib/default.nix b/pkgs/development/python-modules/cyclonedx-python-lib/default.nix index 731aef1c647f..7704e7b8d5a4 100644 --- a/pkgs/development/python-modules/cyclonedx-python-lib/default.nix +++ b/pkgs/development/python-modules/cyclonedx-python-lib/default.nix @@ -6,6 +6,7 @@ , lxml , packageurl-python , poetry-core +, pytestCheckHook , python , pythonOlder , requirements-parser @@ -14,7 +15,6 @@ , toml , types-setuptools , types-toml -, unittestCheckHook , xmldiff }: @@ -48,7 +48,7 @@ buildPythonPackage rec { ]; checkInputs = [ - unittestCheckHook + pytestCheckHook jsonschema lxml xmldiff @@ -59,9 +59,17 @@ buildPythonPackage rec { ]; preCheck = '' - rm tests/test_output_json.py + export PYTHONPATH=tests''${PYTHONPATH+:$PYTHONPATH} ''; + pytestFlagsArray = [ "tests/" ]; + + disabledTests = [ + # These tests require network access. + "test_bom_v1_3_with_metadata_component" + "test_bom_v1_4_with_metadata_component" + ]; + meta = with lib; { description = "Python library for generating CycloneDX SBOMs"; homepage = "https://github.com/CycloneDX/cyclonedx-python-lib";