Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 59 lines 1.3 kB view raw
1{ 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, 13}: 14 15buildPythonPackage rec { 16 pname = "pytest-playwright"; 17 version = "0.5.2"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.8"; 21 22 src = fetchFromGitHub { 23 owner = "microsoft"; 24 repo = "playwright-pytest"; 25 rev = "refs/tags/v${version}"; 26 hash = "sha256-F5tbqm1k4SdTHIUgwSunLIL2W5mhJoMI4x4UZBLidlA="; 27 }; 28 29 build-system = [ 30 setuptools 31 setuptools-scm 32 ]; 33 34 buildInputs = [ pytest ]; 35 36 dependencies = [ 37 playwright 38 pytest-base-url 39 python-slugify 40 ]; 41 42 # Most of the tests rely on network access, or on unavailable browsers such as 43 # msedge, chrome or webkit 44 doCheck = false; 45 46 preCheck = '' 47 export PLAYWRIGHT_BROWSERS_PATH=${playwright-driver.browsers} 48 ''; 49 50 pythonImportsCheck = [ "pytest_playwright" ]; 51 52 meta = with lib; { 53 description = "Pytest plugin to write end-to-end browser tests with Playwright"; 54 homepage = "https://github.com/microsoft/playwright-pytest"; 55 changelog = "https://github.com/microsoft/playwright-pytest/releases/tag/v${version}"; 56 license = licenses.asl20; 57 maintainers = with maintainers; [ sephi ]; 58 }; 59}