2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
2024-07-27 06:49:29 +00:00
|
|
|
fetchFromGitHub,
|
2024-06-05 15:53:02 +00:00
|
|
|
setuptools,
|
|
|
|
zope-interface,
|
|
|
|
zope-schema,
|
|
|
|
zope-cachedescriptors,
|
|
|
|
pytz,
|
|
|
|
webtest,
|
|
|
|
beautifulsoup4,
|
|
|
|
soupsieve,
|
|
|
|
wsgiproxy2,
|
|
|
|
mock,
|
|
|
|
zope-testing,
|
|
|
|
zope-testrunner,
|
|
|
|
python,
|
2022-07-14 12:49:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "zope-testbrowser";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "7.0";
|
|
|
|
pyproject = true;
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zopefoundation";
|
|
|
|
repo = "zope.testbrowser";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-vGx2ObHgt4hSQe/JKZkD2/GhdtbJEAfggkM209maen4=";
|
2022-07-14 12:49:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# remove test that requires network access
|
|
|
|
substituteInPlace src/zope/testbrowser/tests/test_doctests.py \
|
2024-07-27 06:49:29 +00:00
|
|
|
--replace-fail "suite.addTests(wire)" ""
|
2022-07-14 12:49:19 +00:00
|
|
|
'';
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
2022-07-14 12:49:19 +00:00
|
|
|
setuptools
|
2024-01-13 08:15:51 +00:00
|
|
|
zope-interface
|
|
|
|
zope-schema
|
2022-07-14 12:49:19 +00:00
|
|
|
zope-cachedescriptors
|
|
|
|
pytz
|
|
|
|
webtest
|
|
|
|
beautifulsoup4
|
|
|
|
soupsieve
|
|
|
|
wsgiproxy2
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-07-14 12:49:19 +00:00
|
|
|
mock
|
2024-01-02 11:29:13 +00:00
|
|
|
zope-testing
|
2024-01-13 08:15:51 +00:00
|
|
|
zope-testrunner
|
2022-07-14 12:49:19 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m zope.testrunner --test-path=src
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"zope.testbrowser"
|
|
|
|
"zope.testbrowser.browser"
|
|
|
|
"zope.testbrowser.interfaces"
|
|
|
|
"zope.testbrowser.testing"
|
|
|
|
"zope.testbrowser.wsgi"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
2024-07-27 06:49:29 +00:00
|
|
|
changelog = "https://github.com/zopefoundation/zope.testbrowser/blob/${src.rev}/CHANGES.rst";
|
2022-07-14 12:49:19 +00:00
|
|
|
description = "Programmable browser for functional black-box tests";
|
|
|
|
homepage = "https://github.com/zopefoundation/zope.testbrowser";
|
|
|
|
license = lib.licenses.zpl21;
|
|
|
|
maintainers = with lib.maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|