1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 hatchling,
6 hatch-vcs,
7 pytest,
8 pytest-localserver,
9 pytest-metadata,
10 requests,
11 pytestCheckHook,
12 pythonOlder,
13}:
14
15buildPythonPackage rec {
16 pname = "pytest-base-url";
17 version = "2.1.0";
18 format = "pyproject";
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchFromGitHub {
23 owner = "pytest-dev";
24 repo = "pytest-base-url";
25 tag = version;
26 hash = "sha256-3P3Uk3QoznAtNODLjXFbeNn3AOfp9owWU2jqkxTEAa4=";
27 };
28
29 nativeBuildInputs = [
30 hatchling
31 hatch-vcs
32 ];
33
34 buildInputs = [ pytest ];
35
36 propagatedBuildInputs = [ requests ];
37
38 __darwinAllowLocalNetworking = true;
39
40 nativeCheckInputs = [
41 pytestCheckHook
42 pytest-localserver
43 pytest-metadata
44 ];
45
46 enabledTestPaths = [ "tests" ];
47
48 disabledTests = [
49 # should be xfail? or mocking doesn't work
50 "test_url_fails"
51 ];
52
53 pythonImportsCheck = [ "pytest_base_url" ];
54
55 meta = with lib; {
56 description = "Pytest plugin for URL based tests";
57 homepage = "https://github.com/pytest-dev/pytest-base-url";
58 changelog = "https://github.com/pytest-dev/pytest-base-url/blob/${src.rev}/CHANGES.rst";
59 license = licenses.mpl20;
60 maintainers = with maintainers; [ sephi ];
61 };
62}