diff --git a/setup.py b/setup.py index 2546056..91447f2 100644 --- a/setup.py +++ b/setup.py @@ -24,6 +24,7 @@ version = {} with open('planetmint/version.py') as fp: exec(fp.read(), version) + def check_setuptools_features(): """Check if setuptools is up to date.""" import pkg_resources @@ -57,20 +58,20 @@ docs_require = [ ] tests_require = [ - 'coverage', - 'pep8', - 'flake8', - 'flake8-quotes==0.8.1', - 'hypothesis>=5.3.0', - 'pytest>=3.0.0', - 'pytest-cov==2.8.1', - 'pytest-mock', - 'pytest-xdist', - 'pytest-flask', - 'pytest-aiohttp', - 'pytest-asyncio', - 'tox', -] + docs_require + 'coverage', + 'pep8', + 'flake8', + 'flake8-quotes==0.8.1', + 'hypothesis>=5.3.0', + 'pytest>=3.0.0', + 'pytest-cov==2.8.1', + 'pytest-mock', + 'pytest-xdist', + 'pytest-flask', + 'pytest-aiohttp', + 'pytest-asyncio', + 'tox', + ] + docs_require install_requires = [ 'chardet==3.0.4', @@ -139,5 +140,5 @@ setup( 'docs': docs_require, }, package_data={'planetmint.common.schema': ['*.yaml'], - 'planetmint.backend.tarantool': ['*.lua']} + 'planetmint.backend.tarantool': ['*.lua']} ) diff --git a/tests/backend/tarantool/conftest.py b/tests/backend/tarantool/conftest.py index d4bb7d2..d83788e 100644 --- a/tests/backend/tarantool/conftest.py +++ b/tests/backend/tarantool/conftest.py @@ -3,24 +3,24 @@ from planetmint.backend.connection import Connection # # # -@pytest.fixture -def dummy_db(request): - from planetmint.backend import Connection - - conn = Connection() - dbname = request.fixturename - xdist_suffix = getattr(request.config, 'slaveinput', {}).get('slaveid') - if xdist_suffix: - dbname = '{}_{}'.format(dbname, xdist_suffix) - - conn.drop_database() - #_drop_db(conn, dbname) # make sure we start with a clean DB - #schema.init_database(conn, dbname) - conn.init_database() - yield dbname - - conn.drop_database() - #_drop_db(conn, dbname) +# @pytest.fixture +# def dummy_db(request): +# from planetmint.backend import Connection +# +# conn = Connection() +# dbname = request.fixturename +# xdist_suffix = getattr(request.config, 'slaveinput', {}).get('slaveid') +# if xdist_suffix: +# dbname = '{}_{}'.format(dbname, xdist_suffix) +# +# conn.drop_database() +# #_drop_db(conn, dbname) # make sure we start with a clean DB +# #schema.init_database(conn, dbname) +# conn.init_database() +# yield dbname +# +# conn.drop_database() +# #_drop_db(conn, dbname) #def _drop_db(conn, dbname): # try: diff --git a/tests/backend/tarantool/test_schema.py b/tests/backend/tarantool/test_schema.py index d186a2a..3961f33 100644 --- a/tests/backend/tarantool/test_schema.py +++ b/tests/backend/tarantool/test_schema.py @@ -28,10 +28,9 @@ def _check_spaces_by_list(conn, space_names): def test_create_tables(): conn = TarantoolDB('localhost', 3303) # The db is set up by the fixtures so we need to remove it - conn.drop_database() + # conn.drop_database() conn.init_database() - # TODO verify spaces assert conn.SPACE_NAMES == _check_spaces_by_list(conn=conn, space_names=conn.SPACE_NAMES) diff --git a/tests/conftest.py b/tests/conftest.py index ac71731..48cfcaf 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -316,22 +316,22 @@ def inputs(user_pk, b, alice): b.store_bulk_transactions(transactions) -@pytest.fixture -def dummy_db(request): - from planetmint.backend import Connection - - conn = Connection() - dbname = request.fixturename - xdist_suffix = getattr(request.config, 'slaveinput', {}).get('slaveid') - if xdist_suffix: - dbname = '{}_{}'.format(dbname, xdist_suffix) - - - _drop_db(conn, dbname) # make sure we start with a clean DB - schema.init_database(conn, dbname) - yield dbname - - _drop_db(conn, dbname) +# @pytest.fixture +# def dummy_db(request): +# from planetmint.backend import Connection +# +# conn = Connection() +# dbname = request.fixturename +# xdist_suffix = getattr(request.config, 'slaveinput', {}).get('slaveid') +# if xdist_suffix: +# dbname = '{}_{}'.format(dbname, xdist_suffix) +# +# +# _drop_db(conn, dbname) # make sure we start with a clean DB +# schema.init_database(conn, dbname) +# yield dbname +# +# _drop_db(conn, dbname) def _drop_db(conn, dbname):