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:
|
with open('planetmint/version.py') as fp:
|
||||||
exec(fp.read(), version)
|
exec(fp.read(), version)
|
||||||
|
|
||||||
|
|
||||||
def check_setuptools_features():
|
def check_setuptools_features():
|
||||||
"""Check if setuptools is up to date."""
|
"""Check if setuptools is up to date."""
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
@ -57,20 +58,20 @@ docs_require = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
tests_require = [
|
tests_require = [
|
||||||
'coverage',
|
'coverage',
|
||||||
'pep8',
|
'pep8',
|
||||||
'flake8',
|
'flake8',
|
||||||
'flake8-quotes==0.8.1',
|
'flake8-quotes==0.8.1',
|
||||||
'hypothesis>=5.3.0',
|
'hypothesis>=5.3.0',
|
||||||
'pytest>=3.0.0',
|
'pytest>=3.0.0',
|
||||||
'pytest-cov==2.8.1',
|
'pytest-cov==2.8.1',
|
||||||
'pytest-mock',
|
'pytest-mock',
|
||||||
'pytest-xdist',
|
'pytest-xdist',
|
||||||
'pytest-flask',
|
'pytest-flask',
|
||||||
'pytest-aiohttp',
|
'pytest-aiohttp',
|
||||||
'pytest-asyncio',
|
'pytest-asyncio',
|
||||||
'tox',
|
'tox',
|
||||||
] + docs_require
|
] + docs_require
|
||||||
|
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'chardet==3.0.4',
|
'chardet==3.0.4',
|
||||||
@ -139,5 +140,5 @@ setup(
|
|||||||
'docs': docs_require,
|
'docs': docs_require,
|
||||||
},
|
},
|
||||||
package_data={'planetmint.common.schema': ['*.yaml'],
|
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
|
# @pytest.fixture
|
||||||
def dummy_db(request):
|
# def dummy_db(request):
|
||||||
from planetmint.backend import Connection
|
# from planetmint.backend import Connection
|
||||||
|
#
|
||||||
conn = Connection()
|
# conn = Connection()
|
||||||
dbname = request.fixturename
|
# dbname = request.fixturename
|
||||||
xdist_suffix = getattr(request.config, 'slaveinput', {}).get('slaveid')
|
# xdist_suffix = getattr(request.config, 'slaveinput', {}).get('slaveid')
|
||||||
if xdist_suffix:
|
# if xdist_suffix:
|
||||||
dbname = '{}_{}'.format(dbname, xdist_suffix)
|
# dbname = '{}_{}'.format(dbname, xdist_suffix)
|
||||||
|
#
|
||||||
conn.drop_database()
|
# conn.drop_database()
|
||||||
#_drop_db(conn, dbname) # make sure we start with a clean DB
|
# #_drop_db(conn, dbname) # make sure we start with a clean DB
|
||||||
#schema.init_database(conn, dbname)
|
# #schema.init_database(conn, dbname)
|
||||||
conn.init_database()
|
# conn.init_database()
|
||||||
yield dbname
|
# yield dbname
|
||||||
|
#
|
||||||
conn.drop_database()
|
# conn.drop_database()
|
||||||
#_drop_db(conn, dbname)
|
# #_drop_db(conn, dbname)
|
||||||
|
|
||||||
#def _drop_db(conn, dbname):
|
#def _drop_db(conn, dbname):
|
||||||
# try:
|
# try:
|
||||||
|
|||||||
@ -28,10 +28,9 @@ def _check_spaces_by_list(conn, space_names):
|
|||||||
def test_create_tables():
|
def test_create_tables():
|
||||||
conn = TarantoolDB('localhost', 3303)
|
conn = TarantoolDB('localhost', 3303)
|
||||||
# The db is set up by the fixtures so we need to remove it
|
# The db is set up by the fixtures so we need to remove it
|
||||||
conn.drop_database()
|
# conn.drop_database()
|
||||||
conn.init_database()
|
conn.init_database()
|
||||||
|
|
||||||
# TODO verify spaces
|
|
||||||
assert conn.SPACE_NAMES == _check_spaces_by_list(conn=conn, space_names=conn.SPACE_NAMES)
|
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)
|
b.store_bulk_transactions(transactions)
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
# @pytest.fixture
|
||||||
def dummy_db(request):
|
# def dummy_db(request):
|
||||||
from planetmint.backend import Connection
|
# from planetmint.backend import Connection
|
||||||
|
#
|
||||||
conn = Connection()
|
# conn = Connection()
|
||||||
dbname = request.fixturename
|
# dbname = request.fixturename
|
||||||
xdist_suffix = getattr(request.config, 'slaveinput', {}).get('slaveid')
|
# xdist_suffix = getattr(request.config, 'slaveinput', {}).get('slaveid')
|
||||||
if xdist_suffix:
|
# if xdist_suffix:
|
||||||
dbname = '{}_{}'.format(dbname, xdist_suffix)
|
# dbname = '{}_{}'.format(dbname, xdist_suffix)
|
||||||
|
#
|
||||||
|
#
|
||||||
_drop_db(conn, dbname) # make sure we start with a clean DB
|
# _drop_db(conn, dbname) # make sure we start with a clean DB
|
||||||
schema.init_database(conn, dbname)
|
# schema.init_database(conn, dbname)
|
||||||
yield dbname
|
# yield dbname
|
||||||
|
#
|
||||||
_drop_db(conn, dbname)
|
# _drop_db(conn, dbname)
|
||||||
|
|
||||||
|
|
||||||
def _drop_db(conn, dbname):
|
def _drop_db(conn, dbname):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user