12 buildPythonPackage rec {
13 pname = "pytest-console-scripts";
15 format = "setuptools";
17 disabled = pythonOlder "3.7";
20 inherit pname version;
21 hash = "sha256-XGw9qunPn77Q5lUHISiThgAZPcACpc8bGHJIZEugKFc=";
24 SETUPTOOLS_SCM_PRETEND_VERSION = version;
30 propagatedBuildInputs = [
40 # Patch the shebang of a script generated during test.
41 substituteInPlace tests/test_run_scripts.py \
42 --replace "#!/usr/bin/env python" "#!${python.interpreter}"
45 pythonImportsCheck = [
46 "pytest_console_scripts"
50 description = "Pytest plugin for testing console scripts";
52 Pytest-console-scripts is a pytest plugin for running python scripts from within tests.
53 It's quite similar to subprocess.run(), but it also has an in-process mode, where the scripts are executed by the interpreter that's running pytest (using some amount of sandboxing).
55 homepage = "https://github.com/kvas-it/pytest-console-scripts";
56 license = licenses.mit;
57 maintainers = with maintainers; [ AluisioASG ];