Merge lp:~cjwatson/storm/move-tests into lp:storm

Proposed by Colin Watson on 2019-08-11
Status: Merged
Merged at revision: 521
Proposed branch: lp:~cjwatson/storm/move-tests
Merge into: lp:storm
Diff against target: 522 lines (+65/-74)
32 files modified
MANIFEST.in (+1/-2)
NEWS (+2/-0)
setup.py (+1/-1)
storm/tests/__init__.py (+5/-4)
storm/tests/base.py (+1/-2)
storm/tests/cache.py (+1/-2)
storm/tests/database.py (+2/-3)
storm/tests/databases/base.py (+2/-3)
storm/tests/databases/postgres.py (+5/-5)
storm/tests/databases/sqlite.py (+2/-3)
storm/tests/event.py (+1/-2)
storm/tests/expr.py (+1/-2)
storm/tests/helper.py (+1/-1)
storm/tests/info.py (+1/-2)
storm/tests/infoheritance.txt (+2/-1)
storm/tests/properties.py (+7/-7)
storm/tests/schema/patch.py (+1/-1)
storm/tests/schema/schema.py (+1/-1)
storm/tests/schema/sharding.py (+1/-2)
storm/tests/sqlobject.py (+1/-2)
storm/tests/store/base.py (+2/-3)
storm/tests/store/postgres.py (+2/-3)
storm/tests/store/sqlite.py (+2/-3)
storm/tests/tracer.py (+2/-3)
storm/tests/tutorial.txt (+1/-1)
storm/tests/twisted/transact.py (+4/-4)
storm/tests/uri.py (+1/-2)
storm/tests/variables.py (+1/-2)
storm/tests/zope/adapters.py (+2/-2)
storm/tests/zope/testing.py (+6/-2)
storm/tests/zope/zstorm.py (+2/-2)
test (+1/-1)
To merge this branch: bzr merge lp:~cjwatson/storm/move-tests
Reviewer Review Type Date Requested Status
Kristian Glass (community) Approve on 2019-08-12
Storm Developers 2019-08-11 Pending
Review via email: mp+371176@code.launchpad.net

Commit message

Move tests to a new storm.tests package to avoid package manager conflicts.

To post a comment you must log in.
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'MANIFEST.in'
2--- MANIFEST.in 2019-05-30 13:21:20 +0000
3+++ MANIFEST.in 2019-08-11 17:54:31 +0000
4@@ -1,4 +1,3 @@
5-recursive-include storm *.py *.c *.zcml
6-recursive-include tests *.py *.txt
7+recursive-include storm *.py *.c *.zcml *.txt
8
9 include MANIFEST.in LICENSE README TODO NEWS Makefile setup.cfg test tox.ini
10
11=== modified file 'NEWS'
12--- NEWS 2019-06-25 21:33:26 +0000
13+++ NEWS 2019-08-11 17:54:31 +0000
14@@ -19,6 +19,8 @@
15 - Fixed SQLObject tests to work with SQLObject 2.x by using Unicode strings for
16 LIKE operations.
17 - Cope with ThreadTransactionManager changes in transaction 2.4.0.
18+- Move tests to a new storm.tests package to avoid package manager conflicts
19+ (bug #1199578).
20
21 API changes
22 -----------
23
24=== modified file 'setup.py'
25--- setup.py 2019-06-06 10:14:55 +0000
26+++ setup.py 2019-08-11 17:54:31 +0000
27@@ -69,7 +69,7 @@
28 include_package_data=True,
29 zip_safe=False,
30 install_requires=["six"],
31- test_suite="tests.find_tests",
32+ test_suite="storm.tests.find_tests",
33 tests_require=tests_require,
34 extras_require={"test": tests_require},
35 )
36
37=== renamed directory 'tests' => 'storm/tests'
38=== modified file 'storm/tests/__init__.py'
39--- tests/__init__.py 2019-06-05 11:41:07 +0000
40+++ storm/tests/__init__.py 2019-08-11 17:54:31 +0000
41@@ -69,7 +69,7 @@
42 """
43 suite = unittest.TestSuite()
44 topdir = os.path.abspath(
45- os.path.join(os.path.dirname(__file__), os.pardir))
46+ os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
47 testdir = os.path.dirname(__file__)
48 testpaths = set(testpaths)
49 for root, dirnames, filenames in os.walk(testdir):
50@@ -78,7 +78,7 @@
51 relpath = filepath[len(topdir)+1:]
52
53 if (filename == "__init__.py" or filename.endswith(".pyc") or
54- relpath == os.path.join("tests", "conftest.py")):
55+ relpath == os.path.join("storm", "tests", "conftest.py")):
56 # Skip non-tests.
57 continue
58
59@@ -97,10 +97,11 @@
60 unittest.defaultTestLoader.loadTestsFromModule(module))
61 elif filename.endswith(".txt"):
62 load_test = True
63- if relpath == os.path.join("tests", "zope", "README.txt"):
64+ if relpath == os.path.join(
65+ "storm", "tests", "zope", "README.txt"):
66 # Special case the inclusion of the Zope-dependent
67 # ZStorm doctest.
68- import tests.zope as ztest
69+ import storm.tests.zope as ztest
70 load_test = (
71 ztest.has_transaction and
72 ztest.has_zope_component and
73
74=== modified file 'storm/tests/base.py'
75--- tests/base.py 2019-06-05 11:41:07 +0000
76+++ storm/tests/base.py 2019-08-11 17:54:31 +0000
77@@ -26,8 +26,7 @@
78 from storm.properties import Property, PropertyPublisherMeta
79 from storm.info import get_obj_info
80 from storm.base import *
81-
82-from tests.helper import TestHelper
83+from storm.tests.helper import TestHelper
84
85
86 class BaseTest(TestHelper):
87
88=== modified file 'storm/tests/cache.py'
89--- tests/cache.py 2019-06-05 11:41:07 +0000
90+++ storm/tests/cache.py 2019-08-11 17:54:31 +0000
91@@ -5,8 +5,7 @@
92 from storm.properties import Int
93 from storm.info import get_obj_info
94 from storm.cache import Cache, GenerationalCache
95-
96-from tests.helper import TestHelper
97+from storm.tests.helper import TestHelper
98
99
100 class StubObjectInfo(object):
101
102=== modified file 'storm/tests/database.py'
103--- tests/database.py 2019-06-25 21:33:26 +0000
104+++ storm/tests/database.py 2019-08-11 17:54:31 +0000
105@@ -31,9 +31,8 @@
106 from storm.tracer import install_tracer, remove_all_tracers, DebugTracer
107 from storm.uri import URI
108 from storm.expr import *
109-
110-from tests.helper import TestHelper
111-from tests.mocker import ARGS
112+from storm.tests.helper import TestHelper
113+from storm.tests.mocker import ARGS
114
115
116 marker = object()
117
118=== modified file 'storm/tests/databases/base.py'
119--- tests/databases/base.py 2019-06-07 17:14:33 +0000
120+++ storm/tests/databases/base.py 2019-08-11 17:54:31 +0000
121@@ -40,9 +40,8 @@
122 from storm.exceptions import (
123 DatabaseError, DatabaseModuleError, ConnectionBlockedError,
124 DisconnectionError, Error, OperationalError, ProgrammingError)
125-
126-from tests.databases.proxy import ProxyTCPServer
127-from tests.helper import MakePath
128+from storm.tests.databases.proxy import ProxyTCPServer
129+from storm.tests.helper import MakePath
130
131
132 class Marker(object):
133
134=== modified file 'storm/tests/databases/postgres.py'
135--- tests/databases/postgres.py 2019-06-05 11:41:07 +0000
136+++ storm/tests/databases/postgres.py 2019-08-11 17:54:31 +0000
137@@ -44,13 +44,13 @@
138 import storm.info
139 storm # Silence lint.
140
141-from tests import has_fixtures, has_subunit
142-from tests.databases.base import (
143+from storm.tests import has_fixtures, has_subunit
144+from storm.tests.databases.base import (
145 DatabaseTest, DatabaseDisconnectionTest, UnsupportedDatabaseTest,
146 TwoPhaseCommitTest, TwoPhaseCommitDisconnectionTest)
147-from tests.expr import column1, column2, column3, elem1, table1, TrackContext
148-from tests.tracer import TimeoutTracerTestBase
149-from tests.helper import TestHelper
150+from storm.tests.expr import column1, column2, column3, elem1, table1, TrackContext
151+from storm.tests.tracer import TimeoutTracerTestBase
152+from storm.tests.helper import TestHelper
153
154 try:
155 import pgbouncer
156
157=== modified file 'storm/tests/databases/sqlite.py'
158--- tests/databases/sqlite.py 2019-06-05 11:41:07 +0000
159+++ storm/tests/databases/sqlite.py 2019-08-11 17:54:31 +0000
160@@ -28,9 +28,8 @@
161 from storm.databases.sqlite import SQLite
162 from storm.database import create_database
163 from storm.uri import URI
164-
165-from tests.databases.base import DatabaseTest, UnsupportedDatabaseTest
166-from tests.helper import TestHelper, MakePath
167+from storm.tests.databases.base import DatabaseTest, UnsupportedDatabaseTest
168+from storm.tests.helper import TestHelper, MakePath
169
170
171 class SQLiteMemoryTest(DatabaseTest, TestHelper):
172
173=== modified file 'storm/tests/event.py'
174--- tests/event.py 2019-06-05 11:41:07 +0000
175+++ storm/tests/event.py 2019-08-11 17:54:31 +0000
176@@ -21,8 +21,7 @@
177 from __future__ import print_function
178
179 from storm.event import EventSystem
180-
181-from tests.helper import TestHelper
182+from storm.tests.helper import TestHelper
183
184
185 class Marker(object):
186
187=== modified file 'storm/tests/expr.py'
188--- tests/expr.py 2019-06-07 16:36:44 +0000
189+++ storm/tests/expr.py 2019-08-11 17:54:31 +0000
190@@ -25,10 +25,9 @@
191
192 import six
193
194-from tests.helper import TestHelper
195-
196 from storm.variables import *
197 from storm.expr import *
198+from storm.tests.helper import TestHelper
199
200
201 class Func1(NamedFunc):
202
203=== modified file 'storm/tests/helper.py'
204--- tests/helper.py 2019-06-05 11:41:07 +0000
205+++ storm/tests/helper.py 2019-08-11 17:54:31 +0000
206@@ -26,7 +26,7 @@
207 import shutil
208 import sys
209
210-from tests import mocker
211+from storm.tests import mocker
212
213
214 __all__ = ["TestHelper", "MakePath", "LogKeeper"]
215
216=== modified file 'storm/tests/info.py'
217--- tests/info.py 2019-06-05 11:41:07 +0000
218+++ storm/tests/info.py 2019-08-11 17:54:31 +0000
219@@ -28,8 +28,7 @@
220 from storm.variables import Variable
221 from storm.expr import Undef, Select, compile
222 from storm.info import *
223-
224-from tests.helper import TestHelper
225+from storm.tests.helper import TestHelper
226
227
228 class Wrapper(object):
229
230=== modified file 'storm/tests/infoheritance.txt'
231--- tests/infoheritance.txt 2009-02-04 02:00:02 +0000
232+++ storm/tests/infoheritance.txt 2019-08-11 17:54:31 +0000
233@@ -1,5 +1,6 @@
234 This Storm document is included in Storm's source code at
235-`tests/infoheritance.txt` so that it can be tested and be kept up-to-date.
236+`storm/tests/infoheritance.txt` so that it can be tested and be kept
237+up-to-date.
238
239 <<TableOfContents>>
240
241
242=== modified file 'storm/tests/properties.py'
243--- tests/properties.py 2019-06-05 11:41:07 +0000
244+++ storm/tests/properties.py 2019-08-11 17:54:31 +0000
245@@ -32,9 +32,8 @@
246 from storm.variables import *
247 from storm.info import get_obj_info
248 from storm.expr import Column, Select, compile, State, SQLRaw
249-
250-from tests.info import Wrapper
251-from tests.helper import TestHelper
252+from storm.tests.info import Wrapper
253+from storm.tests.helper import TestHelper
254
255
256 class CustomVariable(Variable):
257@@ -954,12 +953,13 @@
258 self.registry.add_class(self.Class)
259 self.registry.add_class(self.SubClass)
260 self.registry.add_class(self.AnotherClass)
261- prop1 = self.registry.get("Class.prop1", "tests.properties")
262- prop2 = self.registry.get("Class.prop2", "tests.properties.bar")
263+ prop1 = self.registry.get("Class.prop1", "storm.tests.properties")
264+ prop2 = self.registry.get("Class.prop2", "storm.tests.properties.bar")
265 self.assertTrue(prop1 is self.Class.prop1)
266 self.assertTrue(prop2 is self.Class.prop2)
267- prop1 = self.registry.get("Class.prop1", "tests.properties.foo")
268- prop2 = self.registry.get("Class.prop2", "tests.properties.foo.bar")
269+ prop1 = self.registry.get("Class.prop1", "storm.tests.properties.foo")
270+ prop2 = self.registry.get(
271+ "Class.prop2", "storm.tests.properties.foo.bar")
272 self.assertTrue(prop1 is self.AnotherClass.prop1)
273 self.assertTrue(prop2 is self.AnotherClass.prop2)
274
275
276=== modified file 'storm/tests/schema/patch.py'
277--- tests/schema/patch.py 2019-06-05 11:41:07 +0000
278+++ storm/tests/schema/patch.py 2019-08-11 17:54:31 +0000
279@@ -27,7 +27,7 @@
280 from storm.locals import StormError, Store, create_database
281 from storm.schema.patch import (
282 Patch, PatchApplier, UnknownPatchError, BadPatchError, PatchSet)
283-from tests.mocker import MockerTestCase
284+from storm.tests.mocker import MockerTestCase
285
286
287 patch_test_0 = """
288
289=== modified file 'storm/tests/schema/schema.py'
290--- tests/schema/schema.py 2019-06-05 11:41:07 +0000
291+++ storm/tests/schema/schema.py 2019-08-11 17:54:31 +0000
292@@ -26,7 +26,7 @@
293 from storm.locals import StormError, Store, create_database
294 from storm.schema.schema import (
295 Schema, SchemaMissingError, UnappliedPatchesError)
296-from tests.mocker import MockerTestCase
297+from storm.tests.mocker import MockerTestCase
298
299
300 class Package(object):
301
302=== modified file 'storm/tests/schema/sharding.py'
303--- tests/schema/sharding.py 2019-06-05 11:41:07 +0000
304+++ storm/tests/schema/sharding.py 2019-08-11 17:54:31 +0000
305@@ -20,10 +20,9 @@
306 #
307 from __future__ import print_function
308
309-from tests.mocker import MockerTestCase
310-
311 from storm.schema.schema import SchemaMissingError, UnappliedPatchesError
312 from storm.schema.sharding import Sharding, PatchLevelMismatchError
313+from storm.tests.mocker import MockerTestCase
314
315
316 class FakeSchema(object):
317
318=== modified file 'storm/tests/sqlobject.py'
319--- tests/sqlobject.py 2019-06-05 11:41:07 +0000
320+++ storm/tests/sqlobject.py 2019-08-11 17:54:31 +0000
321@@ -28,8 +28,7 @@
322 from storm.sqlobject import *
323 from storm.store import Store
324 from storm.tz import tzutc
325-
326-from tests.helper import TestHelper
327+from storm.tests.helper import TestHelper
328
329
330 class SQLObjectTest(TestHelper):
331
332=== modified file 'storm/tests/store/base.py'
333--- tests/store/base.py 2019-06-07 17:14:33 +0000
334+++ storm/tests/store/base.py 2019-08-11 17:54:31 +0000
335@@ -49,9 +49,8 @@
336 from storm.cache import Cache
337 from storm.store import AutoReload, EmptyResultSet, Store, ResultSet
338 from storm.tracer import debug
339-
340-from tests.info import Wrapper
341-from tests.helper import TestHelper
342+from storm.tests.info import Wrapper
343+from storm.tests.helper import TestHelper
344
345
346 class Foo(object):
347
348=== modified file 'storm/tests/store/postgres.py'
349--- tests/store/postgres.py 2019-06-05 11:41:07 +0000
350+++ storm/tests/store/postgres.py 2019-08-11 17:54:31 +0000
351@@ -26,9 +26,8 @@
352 from storm.database import create_database
353 from storm.properties import Enum, Int, List
354 from storm.info import get_obj_info
355-
356-from tests.store.base import StoreTest, EmptyResultSetTest, Foo
357-from tests.helper import TestHelper
358+from storm.tests.store.base import StoreTest, EmptyResultSetTest, Foo
359+from storm.tests.helper import TestHelper
360
361
362 class Lst1(object):
363
364=== modified file 'storm/tests/store/sqlite.py'
365--- tests/store/sqlite.py 2019-06-05 11:41:07 +0000
366+++ storm/tests/store/sqlite.py 2019-08-11 17:54:31 +0000
367@@ -22,9 +22,8 @@
368
369 from storm.databases.sqlite import SQLite
370 from storm.uri import URI
371-
372-from tests.store.base import StoreTest, EmptyResultSetTest
373-from tests.helper import TestHelper, MakePath
374+from storm.tests.store.base import StoreTest, EmptyResultSetTest
375+from storm.tests.helper import TestHelper, MakePath
376
377
378 class SQLiteStoreTest(TestHelper, StoreTest):
379
380=== modified file 'storm/tests/tracer.py'
381--- tests/tracer.py 2019-06-05 11:41:07 +0000
382+++ storm/tests/tracer.py 2019-08-11 17:54:31 +0000
383@@ -5,7 +5,7 @@
384 import sys
385 from unittest import TestCase
386
387-from tests import has_fixtures
388+from storm.tests import has_fixtures
389
390 # Optional dependency. If missing, Fixture tests are skipped.
391 if has_fixtures:
392@@ -28,8 +28,7 @@
393 TimelineTracer, TimeoutError, _tracers)
394 from storm.database import Connection, create_database
395 from storm.expr import Variable
396-
397-from tests.helper import TestHelper
398+from storm.tests.helper import TestHelper
399
400
401 class TracerTest(TestHelper):
402
403=== modified file 'storm/tests/tutorial.txt'
404--- tests/tutorial.txt 2019-06-05 11:41:07 +0000
405+++ storm/tests/tutorial.txt 2019-08-11 17:54:31 +0000
406@@ -4,7 +4,7 @@
407 ==== It runs! ====
408
409 This Storm tutorial is included in the source code at
410-tests/tutorial.txt, so that it may be tested and stay
411+storm/tests/tutorial.txt, so that it may be tested and stay
412 up to date.
413
414
415
416=== modified file 'storm/tests/twisted/transact.py'
417--- tests/twisted/transact.py 2019-06-05 11:41:07 +0000
418+++ storm/tests/twisted/transact.py 2019-08-11 17:54:31 +0000
419@@ -1,9 +1,9 @@
420 from __future__ import print_function
421
422-from tests import has_psycopg
423-from tests.helper import TestHelper
424-from tests.zope import has_transaction, has_zope_component
425-from tests.twisted import has_twisted
426+from storm.tests import has_psycopg
427+from storm.tests.helper import TestHelper
428+from storm.tests.zope import has_transaction, has_zope_component
429+from storm.tests.twisted import has_twisted
430
431 if has_transaction and has_zope_component and has_twisted:
432 import transaction
433
434=== modified file 'storm/tests/uri.py'
435--- tests/uri.py 2019-06-05 11:41:07 +0000
436+++ storm/tests/uri.py 2019-08-11 17:54:31 +0000
437@@ -21,8 +21,7 @@
438 from __future__ import print_function
439
440 from storm.uri import URI, URIError
441-
442-from tests.helper import TestHelper
443+from storm.tests.helper import TestHelper
444
445
446 class URITest(TestHelper):
447
448=== modified file 'storm/tests/variables.py'
449--- tests/variables.py 2019-06-07 17:14:33 +0000
450+++ storm/tests/variables.py 2019-08-11 17:54:31 +0000
451@@ -36,8 +36,7 @@
452 from storm.expr import Column, SQLToken
453 from storm.tz import tzutc, tzoffset
454 from storm import Undef
455-
456-from tests.helper import TestHelper
457+from storm.tests.helper import TestHelper
458
459
460 class Marker(object):
461
462=== modified file 'storm/tests/zope/adapters.py'
463--- tests/zope/adapters.py 2019-06-06 10:14:55 +0000
464+++ storm/tests/zope/adapters.py 2019-08-11 17:54:31 +0000
465@@ -20,8 +20,8 @@
466 #
467 from __future__ import print_function
468
469-from tests.helper import TestHelper
470-from tests.zope import has_zope_component
471+from storm.tests.helper import TestHelper
472+from storm.tests.zope import has_zope_component
473
474
475 if has_zope_component:
476
477=== modified file 'storm/tests/zope/testing.py'
478--- tests/zope/testing.py 2019-06-05 11:41:07 +0000
479+++ storm/tests/zope/testing.py 2019-08-11 17:54:31 +0000
480@@ -23,8 +23,12 @@
481 import os
482 import sys
483
484-from tests.helper import TestHelper
485-from tests.zope import has_transaction, has_zope_component, has_testresources
486+from storm.tests.helper import TestHelper
487+from storm.tests.zope import (
488+ has_testresources,
489+ has_transaction,
490+ has_zope_component,
491+ )
492
493 from storm.locals import create_database, Store, Unicode, Int
494 from storm.exceptions import IntegrityError
495
496=== modified file 'storm/tests/zope/zstorm.py'
497--- tests/zope/zstorm.py 2019-06-06 12:04:07 +0000
498+++ storm/tests/zope/zstorm.py 2019-08-11 17:54:31 +0000
499@@ -24,8 +24,8 @@
500 import weakref
501 import gc
502
503-from tests.helper import TestHelper
504-from tests.zope import has_transaction, has_zope_component
505+from storm.tests.helper import TestHelper
506+from storm.tests.zope import has_transaction, has_zope_component
507
508 if has_transaction:
509 import transaction
510
511=== modified file 'test'
512--- test 2019-05-30 09:54:53 +0000
513+++ test 2019-08-11 17:54:31 +0000
514@@ -48,7 +48,7 @@
515 runner.verbosity = 2
516
517 # Import late, after any and all sys.path jiggery pokery.
518- from tests import find_tests
519+ from storm.tests import find_tests
520
521 suite = find_tests(args)
522 result = runner.run(suite)

Subscribers

People subscribed via source and target branches

to status/vote changes: