Merge pull request #142396 from evanjs/allure-pytest/init

This commit is contained in:
Sandro 2021-12-03 20:13:43 +01:00 committed by GitHub
commit ecaded8d2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 174 additions and 0 deletions

View file

@ -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 ];
};
}

View file

@ -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 ];
};
}

View file

@ -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 ];
};
}

View file

@ -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 { };