gphoto2: remove patch already applied upstream (#380232)
[NixPkgs.git] / pkgs / development / python-modules / pytest-playwright / default.nix
blob537e48717eb176b2dde501f2b0c23d6a024d10a3
2   lib,
3   fetchFromGitHub,
4   buildPythonPackage,
5   playwright,
6   playwright-driver,
7   pytest,
8   pytest-base-url,
9   python-slugify,
10   pythonOlder,
11   setuptools,
12   setuptools-scm,
15 buildPythonPackage rec {
16   pname = "pytest-playwright";
17   version = "0.6.2";
18   pyproject = true;
20   disabled = pythonOlder "3.8";
22   src = fetchFromGitHub {
23     owner = "microsoft";
24     repo = "playwright-pytest";
25     tag = "v${version}";
26     hash = "sha256-/FTAnnVDf9fonNme5SM+9EKa39DtF64pclCts6tTjz0=";
27   };
29   postPatch = ''
30     pushd pytest-playwright
32     substituteInPlace pyproject.toml --replace-fail "==" ">="
33   '';
35   build-system = [
36     setuptools
37     setuptools-scm
38   ];
40   buildInputs = [ pytest ];
42   dependencies = [
43     playwright
44     pytest-base-url
45     python-slugify
46   ];
48   # Most of the tests rely on network access, or on unavailable browsers such as
49   # msedge, chrome or webkit
50   doCheck = false;
52   preCheck = ''
53     popd
54     export PLAYWRIGHT_BROWSERS_PATH=${playwright-driver.browsers}
55   '';
57   pythonImportsCheck = [ "pytest_playwright" ];
59   meta = with lib; {
60     description = "Pytest plugin to write end-to-end browser tests with Playwright";
61     homepage = "https://github.com/microsoft/playwright-pytest";
62     changelog = "https://github.com/microsoft/playwright-pytest/releases/tag/${src.tag}";
63     license = licenses.asl20;
64     maintainers = with maintainers; [ sephi ];
65   };