mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-24 22:45:44 +00:00
last commit
This commit is contained in:
parent
b587640fc5
commit
efee20c6ab
31
setup.py
31
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']}
|
||||
)
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
|
||||
@ -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):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user