diff --git a/pkgs/development/python-modules/allure-pytest/default.nix b/pkgs/development/python-modules/allure-pytest/default.nix new file mode 100644 index 000000000000..49b5f683a6b4 --- /dev/null +++ b/pkgs/development/python-modules/allure-pytest/default.nix @@ -0,0 +1,80 @@ +{ lib +, fetchPypi +, buildPythonPackage +, six +, pythonOlder +, allure-python-commons +, pytest +, pytestCheckHook +, pytest-check +, pytest-flakes +, pytest-lazy-fixture +, pytest-rerunfailures +, pytest-xdist +, pyhamcrest +, mock +, setuptools-scm +}: + +buildPythonPackage rec { + pname = "allure-pytest"; + version = "2.9.45"; + + disabled = pythonOlder "3.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "18ys5gi64jlfya6a7shj5lqhwc6cplwgyq3s2n5mg5x513g0yqi0"; + }; + + buildInputs = [ + pytest + ]; + + nativeBuildInputs = [ + setuptools-scm + ]; + + pythonImportsCheck = [ "allure_pytest" ]; + + propagatedBuildInputs = [ + allure-python-commons + six + ]; + + checkInputs = [ + pyhamcrest + mock + pytestCheckHook + pytest-check + pytest-flakes + pytest-lazy-fixture + pytest-rerunfailures + pytest-xdist + ]; + + pytestFlagsArray = [ + "--basetemp" + "$(mktemp -d)" + "--alluredir" + "$(mktemp -d allure-results.XXXXXXX)" + "-W" + "ignore::pytest.PytestExperimentalApiWarning" + "-p" + "pytester" + ]; + + # we are skipping some of the integration tests for now + disabledTests = [ + "test_pytest_check" + "test_pytest_check_example" + "test_select_by_testcase_id_test" + ]; + + meta = with lib; { + description = "Allure pytest integration. It's developed as pytest plugin and distributed via pypi"; + homepage = "https://github.com/allure-framework/allure-python"; + license = licenses.asl20; + maintainers = with maintainers; [ evanjs ]; + }; +} diff --git a/pkgs/development/python-modules/allure-python-commons-test/default.nix b/pkgs/development/python-modules/allure-python-commons-test/default.nix new file mode 100644 index 000000000000..3c43e698b8e7 --- /dev/null +++ b/pkgs/development/python-modules/allure-python-commons-test/default.nix @@ -0,0 +1,45 @@ +{ lib +, fetchPypi +, buildPythonPackage +, pythonOlder +, attrs +, pluggy +, six +, pyhamcrest +, setuptools-scm +, python +}: + +buildPythonPackage rec { + pname = "allure-python-commons-test"; + version = "2.9.45"; + + disabled = pythonOlder "3.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "0rn8ccxxrm27skv3avdiw56zc4fk2h7nrk3jamqmx6fnvmshiz5f"; + }; + + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ attrs pluggy six pyhamcrest ]; + + checkPhase = '' + ${python.interpreter} -m doctest ./src/container.py + ${python.interpreter} -m doctest ./src/report.py + ${python.interpreter} -m doctest ./src/label.py + ${python.interpreter} -m doctest ./src/result.py + ''; + + pythonImportsCheck = [ "allure_commons_test" ]; + + meta = with lib; { + description = "Just pack of hamcrest matchers for validation result in allure2 json format"; + homepage = "https://github.com/allure-framework/allure-python"; + license = licenses.asl20; + maintainers = with maintainers; [ evanjs ]; + }; +} diff --git a/pkgs/development/python-modules/allure-python-commons/default.nix b/pkgs/development/python-modules/allure-python-commons/default.nix new file mode 100644 index 000000000000..56eb0bbf55ed --- /dev/null +++ b/pkgs/development/python-modules/allure-python-commons/default.nix @@ -0,0 +1,43 @@ +{ lib +, fetchPypi +, buildPythonPackage +, pythonOlder +, attrs +, pluggy +, six +, allure-python-commons-test +, setuptools-scm +, python +}: + +buildPythonPackage rec { + pname = "allure-python-commons"; + version = "2.9.45"; + + disabled = pythonOlder "3.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "17alymsivw8fs89j6phbqgrbprasw8kj72kxa5y8qpn3xa5d4f62"; + }; + + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ attrs pluggy six allure-python-commons-test ]; + + checkPhase = '' + ${python.interpreter} -m doctest ./src/utils.py + ${python.interpreter} -m doctest ./src/mapping.py + ''; + + pythonImportsCheck = [ "allure" "allure_commons" ]; + + meta = with lib; { + description = "Common engine for all modules. It is useful for make integration with your homemade frameworks"; + homepage = "https://github.com/allure-framework/allure-python"; + license = licenses.asl20; + maintainers = with maintainers; [ evanjs ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6deac3025c23..2211b67732d4 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -437,6 +437,12 @@ in { allpairspy = callPackage ../development/python-modules/allpairspy { }; + allure-python-commons = callPackage ../development/python-modules/allure-python-commons { }; + + allure-python-commons-test = callPackage ../development/python-modules/allure-python-commons-test { }; + + allure-pytest = callPackage ../development/python-modules/allure-pytest { }; + alot = callPackage ../development/python-modules/alot { }; alpha-vantage = callPackage ../development/python-modules/alpha-vantage { };