nti.testing 3.1.0__tar.gz → 4.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nti.testing-4.1.0/.pylintrc +227 -0
- nti.testing-4.1.0/.readthedocs.yml +34 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/CHANGES.rst +17 -0
- nti.testing-4.1.0/COPYRIGHT.txt +2 -0
- nti.testing-4.1.0/LICENSE +11 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/MANIFEST.in +4 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/PKG-INFO +50 -14
- {nti.testing-3.1.0 → nti.testing-4.1.0}/README.rst +3 -2
- nti.testing-4.1.0/docs/_static/custom.css +95 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/docs/conf.py +33 -12
- nti.testing-4.1.0/docs/layers.rst +10 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/setup.py +14 -12
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti/testing/__init__.py +1 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti/testing/base.py +65 -12
- nti.testing-4.1.0/src/nti/testing/layers/__init__.py +53 -0
- nti.testing-4.1.0/src/nti/testing/layers/cleanup.py +106 -0
- nti.testing-4.1.0/src/nti/testing/layers/postgres.py +693 -0
- nti.testing-4.1.0/src/nti/testing/layers/tests/test_postgres.py +17 -0
- nti.testing-3.1.0/src/nti/testing/layers.py → nti.testing-4.1.0/src/nti/testing/layers/zope.py +7 -129
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti/testing/matchers.py +21 -22
- nti.testing-4.1.0/src/nti/testing/tests/__init__.py +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti/testing/tests/test_base.py +28 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti/testing/tests/test_layers.py +1 -1
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti/testing/tests/test_matchers.py +1 -1
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti/testing/tests/test_zodb.py +8 -7
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti/testing/time.py +1 -1
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti/testing/zodb.py +1 -1
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti.testing.egg-info/PKG-INFO +50 -14
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti.testing.egg-info/SOURCES.txt +10 -1
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti.testing.egg-info/requires.txt +11 -4
- {nti.testing-3.1.0 → nti.testing-4.1.0}/tox.ini +1 -1
- nti.testing-3.1.0/LICENSE +0 -13
- nti.testing-3.1.0/docs/layers.rst +0 -5
- {nti.testing-3.1.0 → nti.testing-4.1.0}/.coveragerc +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/.isort.cfg +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/.nti_cover_package +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/.travis.yml +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/INSTALL +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/TODO +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/doc-requirements.txt +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/docs/api.rst +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/docs/base.rst +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/docs/changelog.rst +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/docs/index.rst +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/docs/matchers.rst +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/docs/time.rst +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/docs/zodb.rst +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/nose2.cfg +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/setup.cfg +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti/__init__.py +0 -0
- {nti.testing-3.1.0/src/nti/testing → nti.testing-4.1.0/src/nti/testing/layers}/tests/__init__.py +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti/testing/mock.py +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti/testing/tests/test_component_cleanup_broken.txt +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti/testing/tests/test_main.py +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti/testing/tests/test_time.py +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti.testing.egg-info/dependency_links.txt +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti.testing.egg-info/namespace_packages.txt +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti.testing.egg-info/top_level.txt +0 -0
- {nti.testing-3.1.0 → nti.testing-4.1.0}/src/nti.testing.egg-info/zip-safe +0 -0
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
[MASTER]
|
|
2
|
+
load-plugins=pylint.extensions.bad_builtin,
|
|
3
|
+
pylint.extensions.broad_try_clause,
|
|
4
|
+
pylint.extensions.check_elif,
|
|
5
|
+
pylint.extensions.code_style,
|
|
6
|
+
pylint.extensions.dict_init_mutate,
|
|
7
|
+
pylint.extensions.docstyle,
|
|
8
|
+
pylint.extensions.dunder,
|
|
9
|
+
pylint.extensions.comparison_placement,
|
|
10
|
+
pylint.extensions.confusing_elif,
|
|
11
|
+
pylint.extensions.for_any_all,
|
|
12
|
+
pylint.extensions.consider_refactoring_into_while_condition,
|
|
13
|
+
pylint.extensions.mccabe,
|
|
14
|
+
pylint.extensions.eq_without_hash,
|
|
15
|
+
pylint.extensions.redefined_variable_type,
|
|
16
|
+
pylint.extensions.overlapping_exceptions,
|
|
17
|
+
pylint.extensions.docparams,
|
|
18
|
+
pylint.extensions.private_import,
|
|
19
|
+
pylint.extensions.typing,
|
|
20
|
+
|
|
21
|
+
# pylint.extensions.set_membership,
|
|
22
|
+
# wants you to turn ``foo in (1, 2)`` into ``foo in {1, 2}``;
|
|
23
|
+
# but for small tuples, the former is actually more
|
|
24
|
+
# performant.
|
|
25
|
+
|
|
26
|
+
# magic_value wants you to not use arbitrary strings and numbers
|
|
27
|
+
# inline in the code. But it's overzealous and has way too many false
|
|
28
|
+
# positives. Trust people to do the most readable thing.
|
|
29
|
+
# pylint.extensions.magic_value
|
|
30
|
+
|
|
31
|
+
# Empty comment would be good, except it detects blank lines within
|
|
32
|
+
# a single comment block.
|
|
33
|
+
#
|
|
34
|
+
# Those are often used to separate paragraphs, like here.
|
|
35
|
+
# pylint.extensions.empty_comment,
|
|
36
|
+
|
|
37
|
+
# consider_ternary_expression is a nice check, but is also overzealous.
|
|
38
|
+
# Trust the human to do the readable thing.
|
|
39
|
+
# pylint.extensions.consider_ternary_expression,
|
|
40
|
+
|
|
41
|
+
# redefined_loop_name tends to catch us with things like
|
|
42
|
+
# for name in (a, b, c): name = name + '_column' ...
|
|
43
|
+
# pylint.extensions.redefined_loop_name,
|
|
44
|
+
|
|
45
|
+
# This wants you to turn ``x in (1, 2)`` into ``x in {1, 2}``.
|
|
46
|
+
# They both result in the LOAD_CONST bytecode, one a tuple one a
|
|
47
|
+
# frozenset. In theory a set lookup using hashing is faster than
|
|
48
|
+
# a linear scan of a tuple; but if the tuple is small, it can often
|
|
49
|
+
# actually be faster to scan the tuple.
|
|
50
|
+
# pylint.extensions.set_membership,
|
|
51
|
+
|
|
52
|
+
# Fix zope.cachedescriptors.property.Lazy; the property-classes doesn't seem to
|
|
53
|
+
# do anything.
|
|
54
|
+
# https://stackoverflow.com/questions/51160955/pylint-how-to-specify-a-self-defined-property-decorator-with-property-classes
|
|
55
|
+
# For releases prior to 2.14.2, this needs to be a one-line, quoted string. After that,
|
|
56
|
+
# a multi-line string.
|
|
57
|
+
# - Make zope.cachedescriptors.property.Lazy look like a property;
|
|
58
|
+
# fixes pylint thinking it is a method.
|
|
59
|
+
# - Run in Pure Python mode (ignore C extensions that respect this);
|
|
60
|
+
# fixes some issues with zope.interface, like IFoo.providedby(ob)
|
|
61
|
+
# claiming not to have the right number of parameters...except no, it does not.
|
|
62
|
+
init-hook =
|
|
63
|
+
import astroid.bases
|
|
64
|
+
astroid.bases.POSSIBLE_PROPERTIES.add('Lazy')
|
|
65
|
+
astroid.bases.POSSIBLE_PROPERTIES.add('LazyOnClass')
|
|
66
|
+
astroid.bases.POSSIBLE_PROPERTIES.add('readproperty')
|
|
67
|
+
astroid.bases.POSSIBLE_PROPERTIES.add('non_overridable')
|
|
68
|
+
import os
|
|
69
|
+
os.environ['PURE_PYTHON'] = ("1")
|
|
70
|
+
# Ending on a quoted string
|
|
71
|
+
# breaks pylint 2.14.5 (it strips the trailing quote. This is
|
|
72
|
+
# probably because it tries to handle one-line quoted strings as well as multi-blocks).
|
|
73
|
+
# The parens around it fix the issue.
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
[MESSAGES CONTROL]
|
|
77
|
+
|
|
78
|
+
# Disable the message, report, category or checker with the given id(s). You
|
|
79
|
+
# can either give multiple identifier separated by comma (,) or put this option
|
|
80
|
+
# multiple time (only on the command line, not in the configuration file where
|
|
81
|
+
# it should appear only once).
|
|
82
|
+
# NOTE: comments must go ABOVE the statement. In Python 2, mixing in
|
|
83
|
+
# comments disables all directives that follow, while in Python 3, putting
|
|
84
|
+
# comments at the end of the line does the same thing (though Py3 supports
|
|
85
|
+
# mixing)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
# invalid-name, ; We get lots of these, especially in scripts. should fix many of them
|
|
89
|
+
# protected-access, ; We have many cases of this; legit ones need to be examinid and commented, then this removed
|
|
90
|
+
# no-self-use, ; common in superclasses with extension points
|
|
91
|
+
# too-few-public-methods, ; Exception and marker classes get tagged with this
|
|
92
|
+
# exec-used, ; should tag individual instances with this, there are some but not too many
|
|
93
|
+
# global-statement, ; should tag individual instances
|
|
94
|
+
# multiple-statements, ; "from gevent import monkey; monkey.patch_all()"
|
|
95
|
+
# locally-disabled, ; yes, we know we're doing this. don't replace one warning with another
|
|
96
|
+
# cyclic-import, ; most of these are deferred imports
|
|
97
|
+
# too-many-arguments, ; these are almost always because that's what the stdlib does
|
|
98
|
+
# redefined-builtin, ; likewise: these tend to be keyword arguments like len= in the stdlib
|
|
99
|
+
# undefined-all-variable, ; XXX: This crashes with pylint 1.5.4 on Travis (but not locally on Py2/3
|
|
100
|
+
# ; or landscape.io on Py3). The file causing the problem is unclear. UPDATE: identified and disabled
|
|
101
|
+
# that file.
|
|
102
|
+
# see https://github.com/PyCQA/pylint/issues/846
|
|
103
|
+
# useless-suppression: the only way to avoid repeating it for specific statements everywhere that we
|
|
104
|
+
# do Py2/Py3 stuff is to put it here. Sadly this means that we might get better but not realize it.
|
|
105
|
+
# duplicate-code: Yeah, the compatibility ssl modules are much the same
|
|
106
|
+
# In pylint 1.8.0, inconsistent-return-statements are created for the wrong reasons.
|
|
107
|
+
# This code raises it, even though there is only one return (the implicit ``return None`` is presumably
|
|
108
|
+
# what triggers it):
|
|
109
|
+
# def foo():
|
|
110
|
+
# if baz:
|
|
111
|
+
# return 1
|
|
112
|
+
# In Pylint 2dev1, needed for Python 3.7, we get spurious "useless return" errors:
|
|
113
|
+
# @property
|
|
114
|
+
# def foo(self):
|
|
115
|
+
# return None # generates useless-return
|
|
116
|
+
# Pylint 2.4 adds import-outside-toplevel. But we do that a lot to defer imports because of patching.
|
|
117
|
+
# Pylint 2.4 adds self-assigning-variable. But we do *that* to avoid unused-import when we
|
|
118
|
+
# "export" the variable and dont have a __all__.
|
|
119
|
+
# Pylint 2.6+ adds some python-3-only things that dont apply: raise-missing-from, super-with-arguments, consider-using-f-string, redundant-u-string-prefix
|
|
120
|
+
# cyclic import is added because it pylint is spuriously detecting that
|
|
121
|
+
# consider-using-assignment-expr wants you to transform things like:
|
|
122
|
+
# foo = get_foo()
|
|
123
|
+
# if foo: ...
|
|
124
|
+
#
|
|
125
|
+
# Into ``if (foo := get_foo()):``
|
|
126
|
+
# But there are a *lot* of those. Trust people to do the right, most
|
|
127
|
+
# readable, thing
|
|
128
|
+
#
|
|
129
|
+
# docstring-first-line-empty: That's actually our standard, based on Django.
|
|
130
|
+
# XXX: unclear on the docstring warnings, missing-type-doc, missing-param-doc,
|
|
131
|
+
# differing-param-doc, differing-type-doc (are the last two replacements for the first two?)
|
|
132
|
+
#
|
|
133
|
+
# They should be addressed, in general they are a good thing, but sometimes they are
|
|
134
|
+
# unnecessary.
|
|
135
|
+
disable=wrong-import-position,
|
|
136
|
+
wrong-import-order,
|
|
137
|
+
missing-docstring,
|
|
138
|
+
ungrouped-imports,
|
|
139
|
+
invalid-name,
|
|
140
|
+
too-few-public-methods,
|
|
141
|
+
global-statement,
|
|
142
|
+
locally-disabled,
|
|
143
|
+
too-many-arguments,
|
|
144
|
+
useless-suppression,
|
|
145
|
+
duplicate-code,
|
|
146
|
+
useless-object-inheritance,
|
|
147
|
+
import-outside-toplevel,
|
|
148
|
+
self-assigning-variable,
|
|
149
|
+
consider-using-f-string,
|
|
150
|
+
consider-using-assignment-expr,
|
|
151
|
+
use-dict-literal,
|
|
152
|
+
missing-type-doc,
|
|
153
|
+
missing-param-doc,
|
|
154
|
+
differing-param-doc,
|
|
155
|
+
differing-type-doc,
|
|
156
|
+
compare-to-zero,
|
|
157
|
+
docstring-first-line-empty,
|
|
158
|
+
too-many-try-statements,
|
|
159
|
+
redefined-variable-type,
|
|
160
|
+
|
|
161
|
+
enable=consider-using-augmented-assign
|
|
162
|
+
|
|
163
|
+
[FORMAT]
|
|
164
|
+
max-line-length=100
|
|
165
|
+
max-module-lines=1100
|
|
166
|
+
|
|
167
|
+
[MISCELLANEOUS]
|
|
168
|
+
# List of note tags to take in consideration, separated by a comma.
|
|
169
|
+
#notes=FIXME,XXX,TODO
|
|
170
|
+
# Disable that, we don't want them to fail the lint CI job.
|
|
171
|
+
notes=
|
|
172
|
+
|
|
173
|
+
[VARIABLES]
|
|
174
|
+
|
|
175
|
+
dummy-variables-rgx=_.*
|
|
176
|
+
init-import=true
|
|
177
|
+
|
|
178
|
+
[TYPECHECK]
|
|
179
|
+
|
|
180
|
+
# List of members which are set dynamically and missed by pylint inference
|
|
181
|
+
# system, and so shouldnt trigger E1101 when accessed. Python regular
|
|
182
|
+
# expressions are accepted.
|
|
183
|
+
generated-members=REQUEST,acl_users,aq_parent,providedBy
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
# Tells whether missing members accessed in mixin class should be ignored. A
|
|
187
|
+
# mixin class is detected if its name ends with "mixin" (case insensitive).
|
|
188
|
+
# XXX: deprecated in 2.14; replaced with ignored-checks-for-mixins.
|
|
189
|
+
# The defaults for that value seem to be what we want
|
|
190
|
+
#ignore-mixin-members=yes
|
|
191
|
+
|
|
192
|
+
# List of classes names for which member attributes should not be checked
|
|
193
|
+
# (useful for classes with attributes dynamically set). This can work
|
|
194
|
+
# with qualified names.
|
|
195
|
+
#ignored-classes=SSLContext, SSLSocket, greenlet, Greenlet, parent, dead
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
# List of module names for which member attributes should not be checked
|
|
199
|
+
# (useful for modules/projects where namespaces are manipulated during runtime
|
|
200
|
+
# and thus existing member attributes cannot be deduced by static analysis. It
|
|
201
|
+
# supports qualified module names, as well as Unix pattern matching.
|
|
202
|
+
#ignored-modules=gevent._corecffi,gevent.os,os,greenlet,threading,gevent.libev.corecffi,gevent.socket,gevent.core,gevent.testing.support
|
|
203
|
+
ignored-modules=psycopg2.errors
|
|
204
|
+
|
|
205
|
+
[DESIGN]
|
|
206
|
+
max-attributes=12
|
|
207
|
+
max-parents=10
|
|
208
|
+
# Bump complexity up one.
|
|
209
|
+
max-complexity=11
|
|
210
|
+
|
|
211
|
+
[BASIC]
|
|
212
|
+
# Prospector turns ot unsafe-load-any-extension by default, but
|
|
213
|
+
# pylint leaves it off. This is the proximal cause of the
|
|
214
|
+
# undefined-all-variable crash.
|
|
215
|
+
unsafe-load-any-extension = yes
|
|
216
|
+
# This does not seem to work, hence the init-hook
|
|
217
|
+
property-classes=zope.cachedescriptors.property.Lazy,zope.cachedescriptors.property.Cached
|
|
218
|
+
|
|
219
|
+
[CLASSES]
|
|
220
|
+
# List of interface methods to ignore, separated by a comma. This is used for
|
|
221
|
+
# instance to not check methods defines in Zope's Interface base class.
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
# Local Variables:
|
|
226
|
+
# mode: conf
|
|
227
|
+
# End:
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# .readthedocs.yml
|
|
2
|
+
# Read the Docs configuration file
|
|
3
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
4
|
+
|
|
5
|
+
# Some things can only be configured on the RTD dashboard.
|
|
6
|
+
# Those that we may have changed from the default include:
|
|
7
|
+
|
|
8
|
+
# Analytics code:
|
|
9
|
+
# Show Version Warning: False
|
|
10
|
+
# Single Version: True
|
|
11
|
+
|
|
12
|
+
# Required
|
|
13
|
+
version: 2
|
|
14
|
+
|
|
15
|
+
# Build documentation in the docs/ directory with Sphinx
|
|
16
|
+
sphinx:
|
|
17
|
+
builder: html
|
|
18
|
+
configuration: docs/conf.py
|
|
19
|
+
|
|
20
|
+
# Set the version of Python and requirements required to build your
|
|
21
|
+
# docs
|
|
22
|
+
|
|
23
|
+
build:
|
|
24
|
+
# os is required for some reason
|
|
25
|
+
os: ubuntu-22.04
|
|
26
|
+
tools:
|
|
27
|
+
python: "3.11"
|
|
28
|
+
|
|
29
|
+
python:
|
|
30
|
+
install:
|
|
31
|
+
- method: pip
|
|
32
|
+
path: .
|
|
33
|
+
extra_requirements:
|
|
34
|
+
- docs
|
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
Changes
|
|
3
3
|
=========
|
|
4
4
|
|
|
5
|
+
4.1.0 (2024-04-10)
|
|
6
|
+
==================
|
|
7
|
+
|
|
8
|
+
- Add support for, and require, testgres 1.10. This is needed because
|
|
9
|
+
they changed the signature for ``get_pg_version``.
|
|
10
|
+
- Drop support for Python 3.8 and 3.9.
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
4.0.0 (2023-10-24)
|
|
14
|
+
==================
|
|
15
|
+
|
|
16
|
+
- Add support for Python 3.10, 3.11 and 3.12.
|
|
17
|
+
- Drop support for Python 2 and Python 3.6 and 3.7.
|
|
18
|
+
- Add a layer for working with a ``testgres`` Postgres instance.
|
|
19
|
+
- Add methods to the test base classes to support ``unittest.mock`` patches.
|
|
20
|
+
|
|
21
|
+
|
|
5
22
|
3.1.0 (2021-09-08)
|
|
6
23
|
==================
|
|
7
24
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
2
|
+
you may not use this software except in compliance with the License.
|
|
3
|
+
You may obtain a copy of the License at
|
|
4
|
+
|
|
5
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software
|
|
8
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
+
See the License for the specific language governing permissions and
|
|
11
|
+
limitations under the License.
|
|
@@ -12,6 +12,10 @@ recursive-include src *.txt
|
|
|
12
12
|
recursive-include src *.py
|
|
13
13
|
|
|
14
14
|
include *.txt
|
|
15
|
+
include *.yml
|
|
15
16
|
include .isort.cfg
|
|
17
|
+
include .pylintrc
|
|
18
|
+
include .readthedocs.yml
|
|
16
19
|
recursive-include docs *.py
|
|
17
20
|
recursive-include docs *.rst
|
|
21
|
+
recursive-include docs *.css
|
|
@@ -1,31 +1,51 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: nti.testing
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.1.0
|
|
4
4
|
Summary: Support for testing code
|
|
5
|
-
Home-page: https://github.com/
|
|
5
|
+
Home-page: https://github.com/OpenNTI/nti.testing
|
|
6
6
|
Author: Jason Madden
|
|
7
7
|
Author-email: jason@nextthought.com
|
|
8
8
|
License: Apache
|
|
9
9
|
Project-URL: Documentation, https://ntitesting.readthedocs.io/en/latest/
|
|
10
10
|
Keywords: nose2 testing zope3 ZTK hamcrest
|
|
11
|
-
Platform: UNKNOWN
|
|
12
11
|
Classifier: Intended Audience :: Developers
|
|
13
12
|
Classifier: Natural Language :: English
|
|
14
13
|
Classifier: Operating System :: OS Independent
|
|
15
|
-
Classifier:
|
|
16
|
-
Classifier: Programming Language :: Python :: 2.7
|
|
14
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
17
15
|
Classifier: Programming Language :: Python :: 3
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
19
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
23
20
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
24
21
|
Classifier: Topic :: Software Development :: Testing
|
|
25
22
|
Classifier: Framework :: Zope3
|
|
23
|
+
Requires-Python: >=3.10
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: ZODB>=5.6.0
|
|
26
|
+
Requires-Dist: zope.interface>=5.4.0
|
|
27
|
+
Requires-Dist: pyhamcrest
|
|
28
|
+
Requires-Dist: six
|
|
29
|
+
Requires-Dist: setuptools
|
|
30
|
+
Requires-Dist: transaction
|
|
31
|
+
Requires-Dist: zope.component
|
|
32
|
+
Requires-Dist: zope.configuration
|
|
33
|
+
Requires-Dist: zope.dottedname
|
|
34
|
+
Requires-Dist: zope.exceptions
|
|
35
|
+
Requires-Dist: zope.schema
|
|
36
|
+
Requires-Dist: zope.testing
|
|
26
37
|
Provides-Extra: test
|
|
38
|
+
Requires-Dist: Acquisition; extra == "test"
|
|
39
|
+
Requires-Dist: zope.site; extra == "test"
|
|
40
|
+
Requires-Dist: zope.testrunner; extra == "test"
|
|
41
|
+
Requires-Dist: testgres>=1.10; extra == "test"
|
|
42
|
+
Requires-Dist: psycopg2-binary; platform_python_implementation != "PyPy" and extra == "test"
|
|
27
43
|
Provides-Extra: docs
|
|
28
|
-
|
|
44
|
+
Requires-Dist: Sphinx; extra == "docs"
|
|
45
|
+
Requires-Dist: furo; extra == "docs"
|
|
46
|
+
Provides-Extra: testgres
|
|
47
|
+
Requires-Dist: testgres>=1.10; extra == "testgres"
|
|
48
|
+
Requires-Dist: psycopg2-binary; platform_python_implementation != "PyPy" and extra == "testgres"
|
|
29
49
|
|
|
30
50
|
=============
|
|
31
51
|
nti.testing
|
|
@@ -61,8 +81,9 @@ Installation
|
|
|
61
81
|
nti.testing can be installed using pip, either from the git repository
|
|
62
82
|
or from PyPI::
|
|
63
83
|
|
|
64
|
-
pip install nti.testing
|
|
84
|
+
pip install nti.testing[testgres]
|
|
65
85
|
|
|
86
|
+
Use the ``testgres`` extra to be able to use `nti.testing.layers.postgres`.
|
|
66
87
|
|
|
67
88
|
PyHamcrest
|
|
68
89
|
==========
|
|
@@ -208,7 +229,7 @@ Test Fixtures
|
|
|
208
229
|
|
|
209
230
|
Support for test fixtures can be found in `nti.testing.base` and
|
|
210
231
|
`nti.testing.layers`. The ``base`` package includes fully-fleshed
|
|
211
|
-
out base classes for direct use, while the ``layers`` package includes
|
|
232
|
+
out base classes for direct use, while the ``layers`` package mostly includes
|
|
212
233
|
mixins that can be used to construct your own test layers.
|
|
213
234
|
|
|
214
235
|
The ``base`` package makes a distinction between "normal" and "shared"
|
|
@@ -280,6 +301,23 @@ ZODB in `nti.testing.zodb`. See the API documentation for details.
|
|
|
280
301
|
Changes
|
|
281
302
|
=========
|
|
282
303
|
|
|
304
|
+
4.1.0 (2024-04-10)
|
|
305
|
+
==================
|
|
306
|
+
|
|
307
|
+
- Add support for, and require, testgres 1.10. This is needed because
|
|
308
|
+
they changed the signature for ``get_pg_version``.
|
|
309
|
+
- Drop support for Python 3.8 and 3.9.
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
4.0.0 (2023-10-24)
|
|
313
|
+
==================
|
|
314
|
+
|
|
315
|
+
- Add support for Python 3.10, 3.11 and 3.12.
|
|
316
|
+
- Drop support for Python 2 and Python 3.6 and 3.7.
|
|
317
|
+
- Add a layer for working with a ``testgres`` Postgres instance.
|
|
318
|
+
- Add methods to the test base classes to support ``unittest.mock`` patches.
|
|
319
|
+
|
|
320
|
+
|
|
283
321
|
3.1.0 (2021-09-08)
|
|
284
322
|
==================
|
|
285
323
|
|
|
@@ -375,5 +413,3 @@ ZODB in `nti.testing.zodb`. See the API documentation for details.
|
|
|
375
413
|
- Add Python 3 support.
|
|
376
414
|
|
|
377
415
|
- Initial PyPI release.
|
|
378
|
-
|
|
379
|
-
|
|
@@ -32,8 +32,9 @@ Installation
|
|
|
32
32
|
nti.testing can be installed using pip, either from the git repository
|
|
33
33
|
or from PyPI::
|
|
34
34
|
|
|
35
|
-
pip install nti.testing
|
|
35
|
+
pip install nti.testing[testgres]
|
|
36
36
|
|
|
37
|
+
Use the ``testgres`` extra to be able to use `nti.testing.layers.postgres`.
|
|
37
38
|
|
|
38
39
|
PyHamcrest
|
|
39
40
|
==========
|
|
@@ -179,7 +180,7 @@ Test Fixtures
|
|
|
179
180
|
|
|
180
181
|
Support for test fixtures can be found in `nti.testing.base` and
|
|
181
182
|
`nti.testing.layers`. The ``base`` package includes fully-fleshed
|
|
182
|
-
out base classes for direct use, while the ``layers`` package includes
|
|
183
|
+
out base classes for direct use, while the ``layers`` package mostly includes
|
|
183
184
|
mixins that can be used to construct your own test layers.
|
|
184
185
|
|
|
185
186
|
The ``base`` package makes a distinction between "normal" and "shared"
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/* Font definitions */
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family: 'JetBrains Mono';
|
|
4
|
+
src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Bold-Italic.woff2') format('woff2'),
|
|
5
|
+
url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Bold-Italic.woff') format('woff');
|
|
6
|
+
font-weight: 700;
|
|
7
|
+
font-style: italic;
|
|
8
|
+
font-display: swap;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@font-face {
|
|
12
|
+
font-family: 'JetBrains Mono';
|
|
13
|
+
src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Bold.woff2') format('woff2'),
|
|
14
|
+
url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Bold.woff') format('woff');
|
|
15
|
+
font-weight: 700;
|
|
16
|
+
font-style: normal;
|
|
17
|
+
font-display: swap;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@font-face {
|
|
21
|
+
font-family: 'JetBrains Mono';
|
|
22
|
+
src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-ExtraBold-Italic.woff2') format('woff2'),
|
|
23
|
+
url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-ExtraBold-Italic.woff') format('woff');
|
|
24
|
+
font-weight: 800;
|
|
25
|
+
font-style: italic;
|
|
26
|
+
font-display: swap;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@font-face {
|
|
30
|
+
font-family: 'JetBrains Mono';
|
|
31
|
+
src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-ExtraBold.woff2') format('woff2'),
|
|
32
|
+
url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-ExtraBold.woff') format('woff');
|
|
33
|
+
font-weight: 800;
|
|
34
|
+
font-style: normal;
|
|
35
|
+
font-display: swap;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@font-face {
|
|
39
|
+
font-family: 'JetBrains Mono';
|
|
40
|
+
src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Italic.woff2') format('woff2'),
|
|
41
|
+
url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Italic.woff') format('woff');
|
|
42
|
+
font-weight: 400;
|
|
43
|
+
font-style: italic;
|
|
44
|
+
font-display: swap;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@font-face {
|
|
48
|
+
font-family: 'JetBrains Mono';
|
|
49
|
+
src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Medium-Italic.woff2') format('woff2'),
|
|
50
|
+
url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Medium-Italic.woff') format('woff');
|
|
51
|
+
font-weight: 500;
|
|
52
|
+
font-style: italic;
|
|
53
|
+
font-display: swap;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@font-face {
|
|
57
|
+
font-family: 'JetBrains Mono';
|
|
58
|
+
src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Medium.woff2') format('woff2'),
|
|
59
|
+
url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Medium.woff') format('woff');
|
|
60
|
+
font-weight: 500;
|
|
61
|
+
font-style: normal;
|
|
62
|
+
font-display: swap;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@font-face {
|
|
66
|
+
font-family: 'JetBrains Mono';
|
|
67
|
+
src: url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff2/JetBrainsMono-Regular.woff2') format('woff2'),
|
|
68
|
+
url('https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono/web/woff/JetBrainsMono-Regular.woff') format('woff');
|
|
69
|
+
font-weight: 400;
|
|
70
|
+
font-style: normal;
|
|
71
|
+
font-display: swap;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
article {
|
|
76
|
+
/* Furo theme makes this 1.5 which uses soo much space */
|
|
77
|
+
line-height: 1.1;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.admonition-opinion p.admonition-title {
|
|
81
|
+
background-color: rgba(255, 150, 235, 0.44);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
div.admonition-opinion.admonition {
|
|
85
|
+
border-left: .2rem solid rgba(255, 150, 235, 0.44);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
.admonition-design-options p.admonition-title {
|
|
90
|
+
background-color: rgba(173, 28, 237, 0.44);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
div.admonition-design-options.admonition {
|
|
94
|
+
border-left: .2rem solid rgba(173, 28, 237, 0.44);
|
|
95
|
+
}
|
|
@@ -36,9 +36,11 @@ rqmt = pkg_resources.require('nti.testing')[0]
|
|
|
36
36
|
# ones.
|
|
37
37
|
extensions = [
|
|
38
38
|
'sphinx.ext.autodoc',
|
|
39
|
+
'sphinx.ext.autosummary',
|
|
40
|
+
'sphinx.ext.doctest',
|
|
39
41
|
'sphinx.ext.intersphinx',
|
|
42
|
+
'sphinx.ext.todo',
|
|
40
43
|
'sphinx.ext.viewcode',
|
|
41
|
-
'sphinx.ext.doctest',
|
|
42
44
|
]
|
|
43
45
|
|
|
44
46
|
# Add any paths that contain templates here, relative to this directory.
|
|
@@ -55,7 +57,7 @@ master_doc = 'index'
|
|
|
55
57
|
|
|
56
58
|
# General information about the project.
|
|
57
59
|
project = u'nti.testing'
|
|
58
|
-
copyright = u'2017, NextThought'
|
|
60
|
+
copyright = u'2017, NextThought, 2023 Jason Madden'
|
|
59
61
|
author = u'NextThought'
|
|
60
62
|
|
|
61
63
|
# The version info for the project you're documenting, acts as replacement for
|
|
@@ -72,7 +74,7 @@ release = rqmt.version
|
|
|
72
74
|
#
|
|
73
75
|
# This is also used if you do content translation via gettext catalogs.
|
|
74
76
|
# Usually you set "language" from the command line for these cases.
|
|
75
|
-
language =
|
|
77
|
+
language = 'en'
|
|
76
78
|
|
|
77
79
|
# List of patterns, relative to source directory, that match files and
|
|
78
80
|
# directories to ignore when looking for source files.
|
|
@@ -93,7 +95,24 @@ default_role = 'obj'
|
|
|
93
95
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
94
96
|
# a list of builtin themes.
|
|
95
97
|
#
|
|
96
|
-
|
|
98
|
+
# furo: A customizable theme. Intended for smaller datasets, so if we
|
|
99
|
+
# grow too large we may want something different, like
|
|
100
|
+
# sphinx_book_theme.
|
|
101
|
+
#
|
|
102
|
+
# Theme gallery:https://sphinx-themes.org/
|
|
103
|
+
# Furo docs:See https://pradyunsg.me/furo/
|
|
104
|
+
# With Furo, we don't need to have individual ``.. contents::`` directives;
|
|
105
|
+
# if we move away from it we might want to add them back.
|
|
106
|
+
html_theme = 'furo'
|
|
107
|
+
html_css_files = [
|
|
108
|
+
'custom.css',
|
|
109
|
+
]
|
|
110
|
+
html_theme_options = {
|
|
111
|
+
'light_css_variables': {
|
|
112
|
+
'font-stack': '"SF Pro",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',
|
|
113
|
+
'font-stack--monospace': '"JetBrainsMono", "JetBrains Mono", "JetBrains Mono Regular", "JetBrainsMono-Regular", ui-monospace, profont, monospace',
|
|
114
|
+
},
|
|
115
|
+
}
|
|
97
116
|
|
|
98
117
|
# Theme options are theme-specific and customize the look and feel of a theme
|
|
99
118
|
# further. For a list of options available for each theme, see the
|
|
@@ -168,15 +187,16 @@ texinfo_documents = [
|
|
|
168
187
|
|
|
169
188
|
# Example configuration for intersphinx: refer to the Python standard library.
|
|
170
189
|
intersphinx_mapping = {
|
|
171
|
-
'https://
|
|
172
|
-
'
|
|
173
|
-
'https://
|
|
174
|
-
'https://
|
|
175
|
-
'https://
|
|
176
|
-
'https://
|
|
177
|
-
'https://
|
|
190
|
+
'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
|
|
191
|
+
'python': ('http://docs.python.org/', None,),
|
|
192
|
+
'sqlalchemy': ('https://docs.sqlalchemy.org', None,),
|
|
193
|
+
'zopecomponent': ('https://zopecomponent.readthedocs.io/en/latest', None,),
|
|
194
|
+
'zopeconfiguration': ('https://zopeconfiguration.readthedocs.io/en/latest', None,),
|
|
195
|
+
'zopeexceptions': ('https://zopeexceptions.readthedocs.io/en/latest', None,),
|
|
196
|
+
'zopeschema': ('https://zopeschema.readthedocs.io/en/latest', None,),
|
|
197
|
+
'zopeinterface': ('https://zopeinterface.readthedocs.io/en/latest', None,),
|
|
198
|
+
'zodb': ('https://zodb-docs.readthedocs.io/en/latest', None,),
|
|
178
199
|
}
|
|
179
|
-
|
|
180
200
|
extlinks = {
|
|
181
201
|
'issue': ('https://github.com/NextThought/nti.testing/issues/%s',
|
|
182
202
|
'issue #'),
|
|
@@ -189,6 +209,7 @@ extlinks = {
|
|
|
189
209
|
autodoc_default_options = {
|
|
190
210
|
'members': None,
|
|
191
211
|
'show-inheritance': None,
|
|
212
|
+
'special-members': '__enter__, __exit__',
|
|
192
213
|
}
|
|
193
214
|
#autodoc_member_order = 'groupwise'
|
|
194
215
|
autoclass_content = 'both'
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
====================
|
|
2
|
+
nti.testing.layers
|
|
3
|
+
====================
|
|
4
|
+
|
|
5
|
+
.. automodule:: nti.testing.layers
|
|
6
|
+
:ignore-module-all:
|
|
7
|
+
|
|
8
|
+
.. automodule:: nti.testing.layers.zope
|
|
9
|
+
.. automodule:: nti.testing.layers.cleanup
|
|
10
|
+
.. automodule:: nti.testing.layers.postgres
|