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