Skip to content

Commit abda8f1

Browse files
committed
Clean up last modules
Clean up modules that were migrated in PRs: #1136, 1137, 1138, 1139, 1140
1 parent b149868 commit abda8f1

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

tests/test_schema.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
import pytest
33
import inspect
44
import datajoint as dj
5-
from unittest.mock import patch
65
from inspect import getmembers
76
from . import schema
8-
from . import PREFIX
97

108

119
class Ephys(dj.Imported):
@@ -49,10 +47,10 @@ def schema_empty_module(schema_any, schema_empty):
4947

5048

5149
@pytest.fixture
52-
def schema_empty(connection_test, schema_any):
50+
def schema_empty(connection_test, schema_any, prefix):
5351
context = {**schema.LOCALS_ANY, "Ephys": Ephys}
5452
schema_empty = dj.Schema(
55-
PREFIX + "_test1", context=context, connection=connection_test
53+
prefix + "_test1", context=context, connection=connection_test
5654
)
5755
schema_empty(Ephys)
5856
# load the rest of the classes

tests/test_university.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from datajoint import DataJointError
55
import datajoint as dj
66
from .schema_university import *
7-
from . import PREFIX, schema_university
7+
from . import schema_university
88

99

1010
def _hash4(table):
@@ -32,10 +32,10 @@ def schema_uni_inactive():
3232

3333

3434
@pytest.fixture
35-
def schema_uni(db_creds_test, schema_uni_inactive, connection_test):
35+
def schema_uni(db_creds_test, schema_uni_inactive, connection_test, prefix):
3636
# Deferred activation
3737
schema_uni_inactive.activate(
38-
PREFIX + "_university", connection=dj.conn(**db_creds_test)
38+
prefix + "_university", connection=dj.conn(**db_creds_test)
3939
)
4040
# --------------- Fill University -------------------
4141
test_data_dir = Path(__file__).parent / "data"

tests/test_update1.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from pathlib import Path
55
import tempfile
66
import datajoint as dj
7-
from . import PREFIX
87
from datajoint import DataJointError
98

109

@@ -42,9 +41,9 @@ def mock_stores_update(tmpdir_factory):
4241

4342

4443
@pytest.fixture
45-
def schema_update1(connection_test):
44+
def schema_update1(connection_test, prefix):
4645
schema = dj.Schema(
47-
PREFIX + "_update1", context=dict(Thing=Thing), connection=connection_test
46+
prefix + "_update1", context=dict(Thing=Thing), connection=connection_test
4847
)
4948
schema(Thing)
5049
yield schema

0 commit comments

Comments
 (0)