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
1
setup.py
1
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
|
||||
|
||||
@ -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