1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 setuptools, 7 urllib3, 8 selenium, 9 cssselect, 10 django, 11 flask, 12 lxml, 13 pytestCheckHook, 14 zope-testbrowser, 15}: 16 17buildPythonPackage rec { 18 pname = "splinter"; 19 version = "0.21.0"; 20 21 disabled = pythonOlder "3.8"; 22 23 pyproject = true; 24 25 src = fetchFromGitHub { 26 owner = "cobrateam"; 27 repo = "splinter"; 28 tag = version; 29 hash = "sha256-PGGql8yI1YosoUBAyDoI/8k7s4sVYnXEV7eow3GHH88="; 30 }; 31 32 nativeBuildInputs = [ setuptools ]; 33 34 propagatedBuildInputs = [ urllib3 ]; 35 36 optional-dependencies = { 37 "zope.testbrowser" = [ 38 zope-testbrowser 39 lxml 40 cssselect 41 ]; 42 django = [ 43 django 44 lxml 45 cssselect 46 ]; 47 flask = [ 48 flask 49 lxml 50 cssselect 51 ]; 52 selenium = [ selenium ]; 53 }; 54 55 nativeCheckInputs = [ 56 pytestCheckHook 57 ] ++ lib.flatten (lib.attrValues optional-dependencies); 58 59 disabledTests = [ 60 # driver is present and fails with a different error during loading 61 "test_browser_local_driver_not_present" 62 "test_browser_log_missing_drivers" 63 "test_local_driver_not_present" 64 ]; 65 66 disabledTestPaths = [ 67 "samples" 68 # We run neither Chromium nor Firefox nor ... 69 "tests/test_async_finder.py" 70 "tests/test_element_is_visible.py" 71 "tests/test_html_snapshot.py" 72 "tests/test_iframes.py" 73 "tests/test_mouse_interaction.py" 74 "tests/test_popups.py" 75 "tests/test_screenshot.py" 76 "tests/test_shadow_root.py" 77 "tests/test_webdriver.py" 78 "tests/test_webdriver_chrome.py" 79 "tests/test_webdriver_edge_chromium.py" 80 "tests/test_webdriver_firefox.py" 81 "tests/test_webdriver_remote.py" 82 ]; 83 84 pythonImportsCheck = [ "splinter" ]; 85 86 meta = with lib; { 87 changelog = "https://splinter.readthedocs.io/en/latest/news.html"; 88 description = "Browser abstraction for web acceptance testing"; 89 homepage = "https://github.com/cobrateam/splinter"; 90 license = licenses.bsd3; 91 maintainers = with maintainers; [ dotlambda ]; 92 }; 93}