1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatch-vcs,
6 hatchling,
7 pytest-base-url,
8 pytest-html,
9 pytest-mock,
10 pytest-variables,
11 pytest-xdist,
12 pytest,
13 pytestCheckHook,
14 pythonOlder,
15 requests,
16 selenium,
17 tenacity,
18}:
19
20buildPythonPackage rec {
21 pname = "pytest-selenium";
22 version = "4.1.0";
23 pyproject = true;
24
25 disabled = pythonOlder "3.8";
26
27 src = fetchFromGitHub {
28 owner = "pytest-dev";
29 repo = "pytest-selenium";
30 tag = version;
31 hash = "sha256-fIyos73haqTAgp5WVvMwJswQAtXnsnUeXKjPweXLGRM=";
32 };
33
34 build-system = [
35 hatch-vcs
36 hatchling
37 ];
38
39 buildInput = [ pytest ];
40
41 dependencies = [
42 pytest-base-url
43 pytest-html
44 pytest-variables
45 requests
46 selenium
47 tenacity
48 ];
49
50 nativeCheckInputs = [
51 pytest-mock
52 pytest-xdist
53 pytestCheckHook
54 ];
55
56 pythonImportsCheck = [ "pytest_selenium" ];
57
58 disabledTests = [
59 # Tests require additional setup and/or network features
60 "test_driver_quit"
61 "test_driver_retry_pass"
62 "test_event_listening_webdriver"
63 "test_invalid_credentials_env"
64 "test_invalid_credentials_file"
65 "test_invalid_host"
66 "test_launch_case_insensitive"
67 "test_launch"
68 "test_options"
69 "test_preferences_marker"
70 "test_profile"
71 "test_xdist"
72 ];
73
74 meta = {
75 description = "Plugin for running Selenium with pytest";
76 homepage = "https://github.com/pytest-dev/pytest-selenium";
77 changelog = "https://github.com/pytest-dev/pytest-selenium/releases/tag/${version}";
78 license = lib.licenses.mpl20;
79 maintainers = with lib.maintainers; [ fab ];
80 };
81}