tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
python310Packages.pytest-postgresql: init at 5.0.0
Ben Darwin
2 years ago
46dfdf0c
2f169dab
+75
2 changed files
expand all
collapse all
unified
split
pkgs
development
python-modules
pytest-postgresql
default.nix
top-level
python-packages.nix
+73
pkgs/development/python-modules/pytest-postgresql/default.nix
···
1
1
+
{ lib
2
2
+
, buildPythonPackage
3
3
+
, fetchFromGitHub
4
4
+
, pythonOlder
5
5
+
, pytestCheckHook
6
6
+
, setuptools
7
7
+
, mirakuru
8
8
+
, port-for
9
9
+
, psycopg
10
10
+
, pytest
11
11
+
, postgresql
12
12
+
}:
13
13
+
14
14
+
buildPythonPackage rec {
15
15
+
pname = "pytest-postgresql";
16
16
+
version = "5.0.0";
17
17
+
format = "pyproject";
18
18
+
19
19
+
disabled = pythonOlder "3.8";
20
20
+
21
21
+
src = fetchFromGitHub {
22
22
+
owner = "ClearcodeHQ";
23
23
+
repo = "pytest-postgresql";
24
24
+
rev = "refs/tags/v${version}";
25
25
+
hash = "sha256-uWKp9yxTdlswoDPMlhx+2mF1cdhFzhGYKGHdXPGlz+w=";
26
26
+
};
27
27
+
28
28
+
postPatch = ''
29
29
+
substituteInPlace pyproject.toml \
30
30
+
--replace "--cov" "" \
31
31
+
--replace "--max-worker-restart=0" ""
32
32
+
sed -i 's#/usr/lib/postgresql/.*/bin/pg_ctl#${postgresql}/bin/pg_ctl#' pytest_postgresql/plugin.py
33
33
+
'';
34
34
+
35
35
+
buildInputs = [ pytest ];
36
36
+
37
37
+
propagatedBuildInputs = [
38
38
+
mirakuru
39
39
+
port-for
40
40
+
psycopg
41
41
+
setuptools # requires 'pkg_resources' at runtime
42
42
+
];
43
43
+
44
44
+
nativeCheckInputs = [
45
45
+
postgresql
46
46
+
pytestCheckHook
47
47
+
];
48
48
+
pytestFlagsArray = [
49
49
+
"-p"
50
50
+
"no:postgresql"
51
51
+
];
52
52
+
disabledTestPaths = [ "tests/docker/test_noproc_docker.py" ]; # requires Docker
53
53
+
disabledTests = [
54
54
+
# permissions issue running pg as Nixbld user
55
55
+
"test_executor_init_with_password"
56
56
+
# "ValueError: Pytest terminal summary report not found"
57
57
+
"test_postgres_options_config_in_cli"
58
58
+
"test_postgres_options_config_in_ini"
59
59
+
];
60
60
+
pythonImportsCheck = [
61
61
+
"pytest_postgresql"
62
62
+
"pytest_postgresql.executor"
63
63
+
];
64
64
+
65
65
+
66
66
+
meta = with lib; {
67
67
+
homepage = "https://pypi.python.org/pypi/pytest-postgresql";
68
68
+
description = "Pytest plugin that enables you to test code on a temporary PostgreSQL database";
69
69
+
changelog = "https://github.com/ClearcodeHQ/pytest-postgresql/blob/v${version}/CHANGES.rst";
70
70
+
license = licenses.lgpl3Plus;
71
71
+
maintainers = with maintainers; [ bcdarwin ];
72
72
+
};
73
73
+
}
+2
pkgs/top-level/python-packages.nix
···
10349
10349
10350
10350
pytest-plt = callPackage ../development/python-modules/pytest-plt { };
10351
10351
10352
10352
+
pytest-postgresql = callPackage ../development/python-modules/pytest-postgresql { };
10353
10353
+
10352
10354
pytest-pylint = callPackage ../development/python-modules/pytest-pylint { };
10353
10355
10354
10356
pytest-pytestrail = callPackage ../development/python-modules/pytest-pytestrail { };