2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-07-14 12:49:19 +00:00
|
|
|
, isPy27
|
2021-04-12 18:23:04 +00:00
|
|
|
, fetchFromGitHub
|
2024-01-02 11:29:13 +00:00
|
|
|
, setuptools
|
2023-03-15 16:39:30 +00:00
|
|
|
, urllib3
|
2020-04-24 23:36:52 +00:00
|
|
|
, selenium
|
2022-07-14 12:49:19 +00:00
|
|
|
, cssselect
|
|
|
|
, django
|
2020-04-24 23:36:52 +00:00
|
|
|
, flask
|
2022-07-14 12:49:19 +00:00
|
|
|
, lxml
|
2021-04-12 18:23:04 +00:00
|
|
|
, pytestCheckHook
|
2022-07-14 12:49:19 +00:00
|
|
|
, zope-testbrowser
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "splinter";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.20.1";
|
2022-07-14 12:49:19 +00:00
|
|
|
|
|
|
|
disabled = isPy27;
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cobrateam";
|
|
|
|
repo = "splinter";
|
2022-07-14 12:49:19 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-6oHcHIkqOr0aFNfCNjZpm4zIYuz2ov9drfCxSdjAg7o=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-03-15 16:39:30 +00:00
|
|
|
urllib3
|
2021-04-12 18:23:04 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
"zope.testbrowser" = [ zope-testbrowser lxml cssselect ];
|
|
|
|
django = [ django lxml cssselect ];
|
|
|
|
flask = [ flask lxml cssselect ];
|
|
|
|
selenium = [ selenium ];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-12 18:23:04 +00:00
|
|
|
pytestCheckHook
|
2023-03-15 16:39:30 +00:00
|
|
|
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
disabledTests = [
|
|
|
|
# driver is present and fails with a different error during loading
|
2022-07-14 12:49:19 +00:00
|
|
|
"test_browser_local_driver_not_present"
|
2023-03-15 16:39:30 +00:00
|
|
|
"test_browser_log_missing_drivers"
|
2022-06-26 10:26:21 +00:00
|
|
|
"test_local_driver_not_present"
|
|
|
|
];
|
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"samples"
|
2022-07-14 12:49:19 +00:00
|
|
|
# We run neither Chromium nor Firefox nor ...
|
|
|
|
"tests/test_async_finder.py"
|
2023-03-15 16:39:30 +00:00
|
|
|
"tests/test_element_is_visible.py"
|
2022-07-14 12:49:19 +00:00
|
|
|
"tests/test_html_snapshot.py"
|
|
|
|
"tests/test_iframes.py"
|
|
|
|
"tests/test_mouse_interaction.py"
|
2021-07-03 03:11:41 +00:00
|
|
|
"tests/test_popups.py"
|
2022-07-14 12:49:19 +00:00
|
|
|
"tests/test_screenshot.py"
|
|
|
|
"tests/test_shadow_root.py"
|
2021-04-12 18:23:04 +00:00
|
|
|
"tests/test_webdriver.py"
|
|
|
|
"tests/test_webdriver_chrome.py"
|
2021-12-06 16:07:01 +00:00
|
|
|
"tests/test_webdriver_edge_chromium.py"
|
2021-04-12 18:23:04 +00:00
|
|
|
"tests/test_webdriver_firefox.py"
|
|
|
|
"tests/test_webdriver_remote.py"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
pythonImportsCheck = [ "splinter" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Browser abstraction for web acceptance testing";
|
|
|
|
homepage = "https://github.com/cobrateam/splinter";
|
2021-04-12 18:23:04 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|