Skip to content

Commit ea942f9

Browse files
committed
test: move unit/ to test/
This virtually reverts commit 436218d ('move unit tests to unit'), that was made in the scope of #106. Despite the fact that testing of the connector uses `unittest` framework, it is functional (and integration) testing by its nature: most of the test cases verify that public API of the connector properly works with tarantool. In seems meaningful to locate such kind of test cases in the `test/` directory, not `unit/`, disregarding of used framework. Follows up #106.
1 parent dccf18f commit ea942f9

18 files changed

+10
-10
lines changed

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ On Linux:
9797
On Windows:
9898

9999
* Setup a Linux machine with installed tarantool (called ``remote`` later).
100-
* (on ``remote``) Copy ``unit/suites/lib/tarantool_python_ci.lua`` to
100+
* (on ``remote``) Copy ``test/suites/lib/tarantool_python_ci.lua`` to
101101
``/etc/tarantool/instances.available``.
102102
* (on ``remote``) Run ``tarantoolctl start tarantool_python_ci``.
103103
* Set the following environment variables:

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
# Test runner
4040
# python setup.py test
4141
try:
42-
from unit.setup_command import test
42+
from test.setup_command import test
4343
cmdclass["test"] = test
4444
except ImportError:
4545
pass
File renamed without changes.

unit/setup_command.py renamed to test/setup_command.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class test(setuptools.Command):
1212
user_options = []
13-
description = 'Run unit tests'
13+
description = 'Run tests'
1414

1515
def initialize_options(self):
1616
pass
@@ -23,7 +23,7 @@ def run(self):
2323
Find all tests in test/tarantool/ and run them
2424
'''
2525

26-
tests = unittest.defaultTestLoader.discover('unit', pattern='suites')
26+
tests = unittest.defaultTestLoader.discover('test', pattern='suites')
2727
test_runner = unittest.TextTestRunner(verbosity=2)
2828
result = test_runner.run(tests)
2929
if not result.wasSuccessful():
File renamed without changes.
File renamed without changes.
File renamed without changes.

unit/suites/test_dbapi.py renamed to test/suites/test_dbapi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def setUpClass(self):
2626
print(' DBAPI '.center(70, '='), file=sys.stderr)
2727
print('-' * 70, file=sys.stderr)
2828
self.srv = TarantoolServer()
29-
self.srv.script = 'unit/suites/box.lua'
29+
self.srv.script = 'test/suites/box.lua'
3030
self.srv.start()
3131
self.con = tarantool.Connection(self.srv.host, self.srv.args['primary'])
3232
self.driver = dbapi

unit/suites/test_dml.py renamed to test/suites/test_dml.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def setUpClass(self):
1414
print(' DML '.center(70, '='), file=sys.stderr)
1515
print('-' * 70, file=sys.stderr)
1616
self.srv = TarantoolServer()
17-
self.srv.script = 'unit/suites/box.lua'
17+
self.srv.script = 'test/suites/box.lua'
1818
self.srv.start()
1919
self.con = tarantool.Connection(self.srv.host, self.srv.args['primary'])
2020
self.adm = self.srv.admin

unit/suites/test_execute.py renamed to test/suites/test_execute.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def setUpClass(self):
2626
print(' EXECUTE '.center(70, '='), file=sys.stderr)
2727
print('-' * 70, file=sys.stderr)
2828
self.srv = TarantoolServer()
29-
self.srv.script = 'unit/suites/box.lua'
29+
self.srv.script = 'test/suites/box.lua'
3030
self.srv.start()
3131
self.con = tarantool.Connection(self.srv.host, self.srv.args['primary'])
3232

unit/suites/test_mesh.py renamed to test/suites/test_mesh.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
def create_server(_id):
2020
srv = TarantoolServer()
21-
srv.script = 'unit/suites/box.lua'
21+
srv.script = 'test/suites/box.lua'
2222
srv.start()
2323
srv.admin("box.schema.user.create('test', {password = 'test', " +
2424
"if_not_exists = true})")
File renamed without changes.

unit/suites/test_reconnect.py renamed to test/suites/test_reconnect.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def setUpClass(self):
1515
print(' RECONNECT '.center(70, '='), file=sys.stderr)
1616
print('-' * 70, file=sys.stderr)
1717
self.srv = TarantoolServer()
18-
self.srv.script = 'unit/suites/box.lua'
18+
self.srv.script = 'test/suites/box.lua'
1919

2020
def setUp(self):
2121
# prevent a remote tarantool from clean our session

unit/suites/test_schema.py renamed to test/suites/test_schema.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def setUpClass(self):
4343
print(' SCHEMA ({}) '.format(params).center(70, '='), file=sys.stderr)
4444
print('-' * 70, file=sys.stderr)
4545
self.srv = TarantoolServer()
46-
self.srv.script = 'unit/suites/box.lua'
46+
self.srv.script = 'test/suites/box.lua'
4747
self.srv.start()
4848
self.con = tarantool.Connection(self.srv.host, self.srv.args['primary'],
4949
encoding=self.encoding)

0 commit comments

Comments
 (0)