nti.testing 4.0.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.0.0 → nti.testing-4.1.0}/.pylintrc +15 -12
- {nti.testing-4.0.0 → nti.testing-4.1.0}/CHANGES.rst +8 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/PKG-INFO +12 -6
- {nti.testing-4.0.0 → nti.testing-4.1.0}/setup.py +5 -6
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/__init__.py +0 -1
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/base.py +19 -2
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/layers/postgres.py +6 -2
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/layers/zope.py +0 -2
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/matchers.py +3 -1
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/tests/test_base.py +28 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/tests/test_layers.py +1 -1
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/tests/test_matchers.py +1 -1
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/tests/test_zodb.py +8 -7
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/time.py +1 -1
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/zodb.py +1 -1
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti.testing.egg-info/PKG-INFO +12 -6
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti.testing.egg-info/SOURCES.txt +0 -2
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti.testing.egg-info/requires.txt +2 -2
- nti.testing-4.0.0/.github/workflows/tests.yml +0 -47
- nti.testing-4.0.0/.gitignore +0 -8
- {nti.testing-4.0.0 → nti.testing-4.1.0}/.coveragerc +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/.isort.cfg +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/.nti_cover_package +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/.readthedocs.yml +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/.travis.yml +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/COPYRIGHT.txt +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/INSTALL +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/LICENSE +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/MANIFEST.in +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/README.rst +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/TODO +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/doc-requirements.txt +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/docs/_static/custom.css +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/docs/api.rst +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/docs/base.rst +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/docs/changelog.rst +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/docs/conf.py +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/docs/index.rst +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/docs/layers.rst +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/docs/matchers.rst +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/docs/time.rst +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/docs/zodb.rst +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/nose2.cfg +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/setup.cfg +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/__init__.py +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/layers/__init__.py +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/layers/cleanup.py +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/layers/tests/__init__.py +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/layers/tests/test_postgres.py +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/mock.py +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/tests/__init__.py +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/tests/test_component_cleanup_broken.txt +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/tests/test_main.py +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/tests/test_time.py +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti.testing.egg-info/dependency_links.txt +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti.testing.egg-info/namespace_packages.txt +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti.testing.egg-info/top_level.txt +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti.testing.egg-info/zip-safe +0 -0
- {nti.testing-4.0.0 → nti.testing-4.1.0}/tox.ini +0 -0
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
[MASTER]
|
|
2
|
-
load-plugins=
|
|
2
|
+
load-plugins=pylint.extensions.bad_builtin,
|
|
3
3
|
pylint.extensions.broad_try_clause,
|
|
4
|
-
pylint.extensions.bad_builtin,
|
|
5
4
|
pylint.extensions.check_elif,
|
|
6
5
|
pylint.extensions.code_style,
|
|
7
|
-
pylint.extensions.comparison_placement,
|
|
8
|
-
pylint.extensions.confusing_elif,
|
|
9
|
-
pylint.extensions.consider_refactoring_into_while_condition,
|
|
10
6
|
pylint.extensions.dict_init_mutate,
|
|
11
|
-
pylint.extensions.docparams,
|
|
12
7
|
pylint.extensions.docstyle,
|
|
13
8
|
pylint.extensions.dunder,
|
|
14
|
-
pylint.extensions.
|
|
9
|
+
pylint.extensions.comparison_placement,
|
|
10
|
+
pylint.extensions.confusing_elif,
|
|
15
11
|
pylint.extensions.for_any_all,
|
|
12
|
+
pylint.extensions.consider_refactoring_into_while_condition,
|
|
16
13
|
pylint.extensions.mccabe,
|
|
14
|
+
pylint.extensions.eq_without_hash,
|
|
15
|
+
pylint.extensions.redefined_variable_type,
|
|
17
16
|
pylint.extensions.overlapping_exceptions,
|
|
17
|
+
pylint.extensions.docparams,
|
|
18
18
|
pylint.extensions.private_import,
|
|
19
|
-
pylint.extensions.redefined_variable_type,
|
|
20
|
-
pylint.extensions.set_membership,
|
|
21
19
|
pylint.extensions.typing,
|
|
22
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
|
+
|
|
23
26
|
# magic_value wants you to not use arbitrary strings and numbers
|
|
24
27
|
# inline in the code. But it's overzealous and has way too many false
|
|
25
28
|
# positives. Trust people to do the most readable thing.
|
|
@@ -42,8 +45,8 @@ load-plugins=
|
|
|
42
45
|
# This wants you to turn ``x in (1, 2)`` into ``x in {1, 2}``.
|
|
43
46
|
# They both result in the LOAD_CONST bytecode, one a tuple one a
|
|
44
47
|
# frozenset. In theory a set lookup using hashing is faster than
|
|
45
|
-
# a linear scan of a tuple; but if the tuple is small, it can
|
|
46
|
-
# actually be faster to scan the tuple.
|
|
48
|
+
# a linear scan of a tuple; but if the tuple is small, it can often
|
|
49
|
+
# actually be faster to scan the tuple.
|
|
47
50
|
# pylint.extensions.set_membership,
|
|
48
51
|
|
|
49
52
|
# Fix zope.cachedescriptors.property.Lazy; the property-classes doesn't seem to
|
|
@@ -124,7 +127,6 @@ init-hook =
|
|
|
124
127
|
# readable, thing
|
|
125
128
|
#
|
|
126
129
|
# docstring-first-line-empty: That's actually our standard, based on Django.
|
|
127
|
-
# empty-comment: Two lines above this would trigger that. Yick.
|
|
128
130
|
# XXX: unclear on the docstring warnings, missing-type-doc, missing-param-doc,
|
|
129
131
|
# differing-param-doc, differing-type-doc (are the last two replacements for the first two?)
|
|
130
132
|
#
|
|
@@ -154,6 +156,7 @@ disable=wrong-import-position,
|
|
|
154
156
|
compare-to-zero,
|
|
155
157
|
docstring-first-line-empty,
|
|
156
158
|
too-many-try-statements,
|
|
159
|
+
redefined-variable-type,
|
|
157
160
|
|
|
158
161
|
enable=consider-using-augmented-assign
|
|
159
162
|
|
|
@@ -2,6 +2,14 @@
|
|
|
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
|
+
|
|
5
13
|
4.0.0 (2023-10-24)
|
|
6
14
|
==================
|
|
7
15
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: nti.testing
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.1.0
|
|
4
4
|
Summary: Support for testing code
|
|
5
5
|
Home-page: https://github.com/OpenNTI/nti.testing
|
|
6
6
|
Author: Jason Madden
|
|
@@ -13,8 +13,6 @@ Classifier: Natural Language :: English
|
|
|
13
13
|
Classifier: Operating System :: OS Independent
|
|
14
14
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
18
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
@@ -22,7 +20,7 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
|
22
20
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
23
21
|
Classifier: Topic :: Software Development :: Testing
|
|
24
22
|
Classifier: Framework :: Zope3
|
|
25
|
-
Requires-Python: >=3.
|
|
23
|
+
Requires-Python: >=3.10
|
|
26
24
|
License-File: LICENSE
|
|
27
25
|
Requires-Dist: ZODB>=5.6.0
|
|
28
26
|
Requires-Dist: zope.interface>=5.4.0
|
|
@@ -40,13 +38,13 @@ Provides-Extra: test
|
|
|
40
38
|
Requires-Dist: Acquisition; extra == "test"
|
|
41
39
|
Requires-Dist: zope.site; extra == "test"
|
|
42
40
|
Requires-Dist: zope.testrunner; extra == "test"
|
|
43
|
-
Requires-Dist: testgres; extra == "test"
|
|
41
|
+
Requires-Dist: testgres>=1.10; extra == "test"
|
|
44
42
|
Requires-Dist: psycopg2-binary; platform_python_implementation != "PyPy" and extra == "test"
|
|
45
43
|
Provides-Extra: docs
|
|
46
44
|
Requires-Dist: Sphinx; extra == "docs"
|
|
47
45
|
Requires-Dist: furo; extra == "docs"
|
|
48
46
|
Provides-Extra: testgres
|
|
49
|
-
Requires-Dist: testgres; extra == "testgres"
|
|
47
|
+
Requires-Dist: testgres>=1.10; extra == "testgres"
|
|
50
48
|
Requires-Dist: psycopg2-binary; platform_python_implementation != "PyPy" and extra == "testgres"
|
|
51
49
|
|
|
52
50
|
=============
|
|
@@ -303,6 +301,14 @@ ZODB in `nti.testing.zodb`. See the API documentation for details.
|
|
|
303
301
|
Changes
|
|
304
302
|
=========
|
|
305
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
|
+
|
|
306
312
|
4.0.0 (2023-10-24)
|
|
307
313
|
==================
|
|
308
314
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# Copyright 2017 NextThought
|
|
2
|
+
# Copyright 2022-2024 Jason Madden
|
|
2
3
|
# Released under the terms of the LICENSE file.
|
|
3
4
|
import codecs
|
|
4
5
|
from setuptools import setup, find_packages
|
|
5
6
|
|
|
6
7
|
|
|
7
|
-
version = '4.
|
|
8
|
+
version = '4.1.0'
|
|
8
9
|
|
|
9
10
|
entry_points = {
|
|
10
11
|
}
|
|
@@ -13,7 +14,7 @@ TESTS_REQUIRE = [
|
|
|
13
14
|
'Acquisition',
|
|
14
15
|
'zope.site',
|
|
15
16
|
'zope.testrunner',
|
|
16
|
-
'testgres',
|
|
17
|
+
'testgres >= 1.10',
|
|
17
18
|
'psycopg2-binary; python_implementation != "PyPy"',
|
|
18
19
|
]
|
|
19
20
|
|
|
@@ -40,8 +41,6 @@ setup(
|
|
|
40
41
|
'Operating System :: OS Independent',
|
|
41
42
|
'License :: OSI Approved :: Apache Software License',
|
|
42
43
|
'Programming Language :: Python :: 3',
|
|
43
|
-
'Programming Language :: Python :: 3.8',
|
|
44
|
-
'Programming Language :: Python :: 3.9',
|
|
45
44
|
'Programming Language :: Python :: 3.10',
|
|
46
45
|
'Programming Language :: Python :: 3.11',
|
|
47
46
|
'Programming Language :: Python :: 3.12',
|
|
@@ -78,9 +77,9 @@ setup(
|
|
|
78
77
|
'furo',
|
|
79
78
|
],
|
|
80
79
|
'testgres': [
|
|
81
|
-
'testgres',
|
|
80
|
+
'testgres >= 1.10',
|
|
82
81
|
'psycopg2-binary; python_implementation != "PyPy"',
|
|
83
82
|
],
|
|
84
83
|
},
|
|
85
|
-
python_requires=">=3.
|
|
84
|
+
python_requires=">=3.10",
|
|
86
85
|
)
|
|
@@ -52,7 +52,6 @@ from .matchers import provides
|
|
|
52
52
|
from .matchers import implements
|
|
53
53
|
from .matchers import verifiably_provides
|
|
54
54
|
from .matchers import validly_provides
|
|
55
|
-
from .matchers import provides
|
|
56
55
|
from .matchers import validated_by
|
|
57
56
|
from .matchers import not_validated_by
|
|
58
57
|
from .matchers import aq_inContextOf
|
|
@@ -400,7 +400,8 @@ class ConfiguringTestBase(AbstractConfiguringObject,
|
|
|
400
400
|
def _doSetUpSuper(self):
|
|
401
401
|
super().setUp()
|
|
402
402
|
|
|
403
|
-
setUp
|
|
403
|
+
def setUp(self):
|
|
404
|
+
AbstractConfiguringObject._doSetUp(self)
|
|
404
405
|
|
|
405
406
|
#: Configure additional packages. This should only be done in the ``setUp`` method
|
|
406
407
|
#: of a subclass. Note that this is called by ``setUp``.
|
|
@@ -419,7 +420,23 @@ class ConfiguringTestBase(AbstractConfiguringObject,
|
|
|
419
420
|
def _doTearDownSuper(self):
|
|
420
421
|
super().tearDown()
|
|
421
422
|
|
|
422
|
-
tearDown
|
|
423
|
+
def tearDown(self):
|
|
424
|
+
self._doTearDownConfiguration()
|
|
425
|
+
|
|
426
|
+
def _doTearDownConfiguration(self):
|
|
427
|
+
"""
|
|
428
|
+
Hook for subclasses to override.
|
|
429
|
+
|
|
430
|
+
This implementation calls :meth:`AbstractConfiguringObject._doTearDown`
|
|
431
|
+
with the default parameters. If you need to call it with a different
|
|
432
|
+
set of parameters, override this method to do so.
|
|
433
|
+
|
|
434
|
+
This method takes no arguments because the arguments passed to
|
|
435
|
+
``_doTearDown`` are almost always static at the callsite.
|
|
436
|
+
"""
|
|
437
|
+
AbstractConfiguringObject._doTearDown(
|
|
438
|
+
self,
|
|
439
|
+
)
|
|
423
440
|
|
|
424
441
|
class SharedConfiguringTestBase(AbstractConfiguringObject,
|
|
425
442
|
AbstractSharedTestBase):
|
|
@@ -78,7 +78,11 @@ if 'NTI_LOAD_DB_FILE' in os.environ:
|
|
|
78
78
|
LOAD_DATABASE_ON_SETUP = os.environ['NTI_LOAD_DB_FILE']
|
|
79
79
|
|
|
80
80
|
|
|
81
|
-
def patched_get_pg_version():
|
|
81
|
+
def patched_get_pg_version(*args, **kwargs):
|
|
82
|
+
# We patch this in testgres.node, so its ok to import
|
|
83
|
+
# the original. In version 1.10, they changed the signature
|
|
84
|
+
# of this function, so be sure to accept whatever it does and
|
|
85
|
+
# pass it on.
|
|
82
86
|
from testgres.utils import get_pg_version
|
|
83
87
|
from testgres.node import PgVer
|
|
84
88
|
from packaging.version import InvalidVersion
|
|
@@ -90,7 +94,7 @@ def patched_get_pg_version():
|
|
|
90
94
|
# "15.3-0+". If it can't be parsed, then return a fake.
|
|
91
95
|
|
|
92
96
|
try:
|
|
93
|
-
version = get_pg_version()
|
|
97
|
+
version = get_pg_version(*args, **kwargs)
|
|
94
98
|
PgVer(version)
|
|
95
99
|
except InvalidVersion:
|
|
96
100
|
print('testgres: Got invalid postgres version', version)
|
|
@@ -352,7 +352,9 @@ BaseDescription.append_description_of = _append_description_of_map
|
|
|
352
352
|
|
|
353
353
|
|
|
354
354
|
class TypeCheckedDict(dict):
|
|
355
|
-
"
|
|
355
|
+
"""
|
|
356
|
+
A dictionary that ensures keys and values are of the required type when set
|
|
357
|
+
"""
|
|
356
358
|
|
|
357
359
|
def __init__(self, key_class=object, val_class=object, notify=None):
|
|
358
360
|
dict.__init__(self)
|
|
@@ -79,6 +79,7 @@ class TestBase(unittest.TestCase):
|
|
|
79
79
|
raise AssertionError("Not called")
|
|
80
80
|
|
|
81
81
|
MyTest.setUpClass()
|
|
82
|
+
# pylint:disable-next=simplifiable-if-expression
|
|
82
83
|
assert_that(gc.isenabled(), is_(False if not base._is_pypy else True))
|
|
83
84
|
MyTest.tearDownClass()
|
|
84
85
|
assert_that(gc.isenabled(), is_(True))
|
|
@@ -130,3 +131,30 @@ class TestBase(unittest.TestCase):
|
|
|
130
131
|
base.module_setup()
|
|
131
132
|
base.module_setup(set_up_packages=('zope.component',))
|
|
132
133
|
base.module_teardown()
|
|
134
|
+
|
|
135
|
+
def test_calling_super_linting(self):
|
|
136
|
+
# Deriving a class from our bases and calling their setup
|
|
137
|
+
# methods should NOT produce linter warnings.
|
|
138
|
+
# So this section should not have pylint disable commands.
|
|
139
|
+
class X(base.AbstractTestBase):
|
|
140
|
+
def setUp(self):
|
|
141
|
+
super().setUp()
|
|
142
|
+
self.thing = 1
|
|
143
|
+
|
|
144
|
+
def tearDown(self):
|
|
145
|
+
super().tearDown()
|
|
146
|
+
self.thing = 2
|
|
147
|
+
|
|
148
|
+
class Y(base.ConfiguringTestBase):
|
|
149
|
+
def setUp(self):
|
|
150
|
+
super().setUp()
|
|
151
|
+
self.thing = 1
|
|
152
|
+
|
|
153
|
+
def tearDown(self):
|
|
154
|
+
super().tearDown()
|
|
155
|
+
self.thing = 2
|
|
156
|
+
|
|
157
|
+
X().setUp()
|
|
158
|
+
X().tearDown()
|
|
159
|
+
Y().setUp()
|
|
160
|
+
Y().tearDown()
|
|
@@ -46,7 +46,7 @@ class MockDBTrans(zodb.mock_db_trans):
|
|
|
46
46
|
def __init__(self, db=None):
|
|
47
47
|
if db is None:
|
|
48
48
|
db = MockDB()
|
|
49
|
-
super(
|
|
49
|
+
super().__init__(db)
|
|
50
50
|
self.exc_file = NativeStringIO()
|
|
51
51
|
|
|
52
52
|
class TestMockDBTrans(unittest.TestCase):
|
|
@@ -85,7 +85,7 @@ class TestMockDBTrans(unittest.TestCase):
|
|
|
85
85
|
with self.assertRaises(zodb._TransactionManagerModeChanged) as exc:
|
|
86
86
|
with MockDBTrans():
|
|
87
87
|
transaction.manager.explicit = False
|
|
88
|
-
raise Exception("BodyError")
|
|
88
|
+
raise Exception("BodyError") # pylint:disable=broad-exception-raised
|
|
89
89
|
# The backing exception is included
|
|
90
90
|
self.assertIn('BodyError', str(exc.exception))
|
|
91
91
|
|
|
@@ -219,7 +219,8 @@ class TestMockDBTrans(unittest.TestCase):
|
|
|
219
219
|
pass
|
|
220
220
|
|
|
221
221
|
class MyFalse(object):
|
|
222
|
-
|
|
222
|
+
def __bool__(self):
|
|
223
|
+
return False
|
|
223
224
|
|
|
224
225
|
transaction.manager.explicit = MyFalse()
|
|
225
226
|
class MyMock(MockDBTrans):
|
|
@@ -276,10 +277,10 @@ class TestZODBLayer(unittest.TestCase):
|
|
|
276
277
|
|
|
277
278
|
|
|
278
279
|
class IExtra(interface.Interface): # pylint:disable=inherit-non-class
|
|
279
|
-
"An extra interface"
|
|
280
|
+
"""An extra interface."""
|
|
280
281
|
|
|
281
282
|
class IExtra2(interface.Interface): # pylint:disable=inherit-non-class
|
|
282
|
-
"Another extra interface"
|
|
283
|
+
"""Another extra interface."""
|
|
283
284
|
|
|
284
285
|
class Object(object):
|
|
285
286
|
|
|
@@ -290,12 +291,12 @@ class TestResetDbCaches(unittest.TestCase):
|
|
|
290
291
|
layer = zodb.ZODBLayer
|
|
291
292
|
|
|
292
293
|
def setUp(self):
|
|
293
|
-
super(
|
|
294
|
+
super().setUp()
|
|
294
295
|
gc.disable()
|
|
295
296
|
|
|
296
297
|
def tearDown(self):
|
|
297
298
|
gc.enable()
|
|
298
|
-
super(
|
|
299
|
+
super().tearDown()
|
|
299
300
|
|
|
300
301
|
def test_persistent_site_closed(self):
|
|
301
302
|
from zope.site.site import LocalSiteManager
|
|
@@ -140,7 +140,7 @@ class mock_db_trans(object):
|
|
|
140
140
|
catch = Exception if ignore_errors else ()
|
|
141
141
|
try:
|
|
142
142
|
conn.close()
|
|
143
|
-
except catch:
|
|
143
|
+
except catch: # pylint:disable=broad-exception-caught
|
|
144
144
|
self._report_exception("Unexpected error closing connection; ignored.", *sys.exc_info())
|
|
145
145
|
|
|
146
146
|
def __exit__(self, t, v, tb):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: nti.testing
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.1.0
|
|
4
4
|
Summary: Support for testing code
|
|
5
5
|
Home-page: https://github.com/OpenNTI/nti.testing
|
|
6
6
|
Author: Jason Madden
|
|
@@ -13,8 +13,6 @@ Classifier: Natural Language :: English
|
|
|
13
13
|
Classifier: Operating System :: OS Independent
|
|
14
14
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
18
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
@@ -22,7 +20,7 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
|
22
20
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
23
21
|
Classifier: Topic :: Software Development :: Testing
|
|
24
22
|
Classifier: Framework :: Zope3
|
|
25
|
-
Requires-Python: >=3.
|
|
23
|
+
Requires-Python: >=3.10
|
|
26
24
|
License-File: LICENSE
|
|
27
25
|
Requires-Dist: ZODB>=5.6.0
|
|
28
26
|
Requires-Dist: zope.interface>=5.4.0
|
|
@@ -40,13 +38,13 @@ Provides-Extra: test
|
|
|
40
38
|
Requires-Dist: Acquisition; extra == "test"
|
|
41
39
|
Requires-Dist: zope.site; extra == "test"
|
|
42
40
|
Requires-Dist: zope.testrunner; extra == "test"
|
|
43
|
-
Requires-Dist: testgres; extra == "test"
|
|
41
|
+
Requires-Dist: testgres>=1.10; extra == "test"
|
|
44
42
|
Requires-Dist: psycopg2-binary; platform_python_implementation != "PyPy" and extra == "test"
|
|
45
43
|
Provides-Extra: docs
|
|
46
44
|
Requires-Dist: Sphinx; extra == "docs"
|
|
47
45
|
Requires-Dist: furo; extra == "docs"
|
|
48
46
|
Provides-Extra: testgres
|
|
49
|
-
Requires-Dist: testgres; extra == "testgres"
|
|
47
|
+
Requires-Dist: testgres>=1.10; extra == "testgres"
|
|
50
48
|
Requires-Dist: psycopg2-binary; platform_python_implementation != "PyPy" and extra == "testgres"
|
|
51
49
|
|
|
52
50
|
=============
|
|
@@ -303,6 +301,14 @@ ZODB in `nti.testing.zodb`. See the API documentation for details.
|
|
|
303
301
|
Changes
|
|
304
302
|
=========
|
|
305
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
|
+
|
|
306
312
|
4.0.0 (2023-10-24)
|
|
307
313
|
==================
|
|
308
314
|
|
|
@@ -19,13 +19,13 @@ furo
|
|
|
19
19
|
Acquisition
|
|
20
20
|
zope.site
|
|
21
21
|
zope.testrunner
|
|
22
|
-
testgres
|
|
22
|
+
testgres>=1.10
|
|
23
23
|
|
|
24
24
|
[test:platform_python_implementation != "PyPy"]
|
|
25
25
|
psycopg2-binary
|
|
26
26
|
|
|
27
27
|
[testgres]
|
|
28
|
-
testgres
|
|
28
|
+
testgres>=1.10
|
|
29
29
|
|
|
30
30
|
[testgres:platform_python_implementation != "PyPy"]
|
|
31
31
|
psycopg2-binary
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
name: tests
|
|
2
|
-
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
|
|
5
|
-
env:
|
|
6
|
-
PYTHONHASHSEED: 1042466059
|
|
7
|
-
ZOPE_INTERFACE_STRICT_IRO: 1
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
test:
|
|
12
|
-
strategy:
|
|
13
|
-
matrix:
|
|
14
|
-
python-version: ["pypy-3.10", "3.8", "3.9", "3.11", "3.12"]
|
|
15
|
-
|
|
16
|
-
runs-on: ubuntu-latest
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v3
|
|
19
|
-
- name: Set up Python
|
|
20
|
-
uses: actions/setup-python@v4
|
|
21
|
-
with:
|
|
22
|
-
python-version: ${{ matrix.python-version }}
|
|
23
|
-
cache: 'pip'
|
|
24
|
-
cache-dependency-path: 'setup.py'
|
|
25
|
-
- name: Install dependencies
|
|
26
|
-
run: |
|
|
27
|
-
python -m pip install -U pip setuptools wheel
|
|
28
|
-
python -m pip install -U coverage
|
|
29
|
-
python -m pip install -U -e ".[test,docs]"
|
|
30
|
-
- name: Test
|
|
31
|
-
run: |
|
|
32
|
-
coverage run -m zope.testrunner --test-path=src --auto-color --auto-progress
|
|
33
|
-
coverage run -a -m sphinx -b doctest -d docs/_build/doctrees docs docs/_build/doctests
|
|
34
|
-
- name: Submit to Coveralls
|
|
35
|
-
# This is a container action, which only runs on Linux.
|
|
36
|
-
uses: AndreMiras/coveralls-python-action@develop
|
|
37
|
-
with:
|
|
38
|
-
parallel: true
|
|
39
|
-
|
|
40
|
-
coveralls_finish:
|
|
41
|
-
needs: test
|
|
42
|
-
runs-on: ubuntu-latest
|
|
43
|
-
steps:
|
|
44
|
-
- name: Coveralls Finished
|
|
45
|
-
uses: AndreMiras/coveralls-python-action@develop
|
|
46
|
-
with:
|
|
47
|
-
parallel-finished: true
|
nti.testing-4.0.0/.gitignore
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nti.testing-4.0.0 → nti.testing-4.1.0}/src/nti/testing/tests/test_component_cleanup_broken.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|