diff options
author | Fabian Affolter <mail@fabian-affolter.ch> | 2021-02-19 18:18:11 +0100 |
---|---|---|
committer | Fabian Affolter <mail@fabian-affolter.ch> | 2021-02-19 18:18:11 +0100 |
commit | 53b2a693f7124f1d839ab0a4fcdd74234c270eb5 (patch) | |
tree | 7b029f8d70b8304834dff357eb0bb7321749b6b6 /pkgs/development/python-modules/getmac | |
parent | 8b166bcee0de0a1ba00b88adb57958d0a6a9c91b (diff) |
python3Packages.getmac: switch to pytestCheckHook and fix build
Diffstat (limited to 'pkgs/development/python-modules/getmac')
-rw-r--r-- | pkgs/development/python-modules/getmac/default.nix | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/getmac/default.nix b/pkgs/development/python-modules/getmac/default.nix index 51ce0ef050313..483539bc221fc 100644 --- a/pkgs/development/python-modules/getmac/default.nix +++ b/pkgs/development/python-modules/getmac/default.nix @@ -1,5 +1,10 @@ -{ lib, buildPythonPackage, fetchFromGitHub -, pytest, pytest-benchmark, pytest-mock }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytest-benchmark +, pytest-mock +, pytestCheckHook +}: buildPythonPackage rec { pname = "getmac"; @@ -7,19 +12,32 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "GhostofGoes"; - repo = "getmac"; + repo = pname; rev = version; sha256 = "08d4iv5bjl1s4i9qhzf3pzjgj1rgbwi0x26qypf3ycgdj0a6gvh2"; }; - checkInputs = [ pytest pytest-benchmark pytest-mock ]; - checkPhase = '' - pytest --ignore tests/test_cli.py - ''; + checkInputs = [ + pytestCheckHook + pytest-benchmark + pytest-mock + ]; + + disabledTests = [ + # Disable CLI tests + "test_cli_main_basic" + "test_cli_main_verbose" + "test_cli_main_debug" + "test_cli_multiple_debug_levels" + # Disable test that require network access + "test_uuid_lanscan_iface" + ]; + + pythonImportsCheck = [ "getmac" ]; meta = with lib; { + description = "Python package to get the MAC address of network interfaces and hosts on the local network"; homepage = "https://github.com/GhostofGoes/getmac"; - description = "Pure-Python package to get the MAC address of network interfaces and hosts on the local network."; license = licenses.mit; maintainers = with maintainers; [ colemickens ]; }; |