diff --git a/pkgs/development/python-modules/ascii-magic/default.nix b/pkgs/development/python-modules/ascii-magic/default.nix index d509e0ef4624..0c876d756ebe 100644 --- a/pkgs/development/python-modules/ascii-magic/default.nix +++ b/pkgs/development/python-modules/ascii-magic/default.nix @@ -3,12 +3,13 @@ , colorama , fetchPypi , pillow +, pytestCheckHook , pythonOlder }: buildPythonPackage rec { pname = "ascii-magic"; - version = "2.1.1"; + version = "2.3.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -16,7 +17,7 @@ buildPythonPackage rec { src = fetchPypi { pname = "ascii_magic"; inherit version; - hash = "sha256-YfGa+3nuqAAo69TydxO6uKNMcqZAkOEi/PMP8Frasfw="; + hash = "sha256-PtQaHLFn3u1cz8YotmnzWjoD9nvdctzBi+X/2KJkPYU="; }; propagatedBuildInputs = [ @@ -24,14 +25,27 @@ buildPythonPackage rec { pillow ]; - # Project is not tagging releases and tests are not shipped with PyPI source - # https://github.com/LeandroBarone/python-ascii_magic/issues/10 - doCheck = false; + nativeCheckInputs = [ + pytestCheckHook + ]; pythonImportsCheck = [ "ascii_magic" ]; + preCheck = '' + cd tests + ''; + + disabledTests = [ + # Test requires network access + "test_from_url" + "test_quick_test" + "test_wrong_url" + # No clipboard in the sandbox + "test_from_clipboard" + ]; + meta = with lib; { description = "Python module to converts pictures into ASCII art"; homepage = "https://github.com/LeandroBarone/python-ascii_magic";