Skip to content

Commit 7bf0c83

Browse files
Co-locate connection schema to match previous test.
1 parent 4c8eb95 commit 7bf0c83

File tree

2 files changed

+26
-27
lines changed

2 files changed

+26
-27
lines changed

tests/schemas/connection.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

tests/test_connection.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,32 @@
66
from datajoint import DataJointError
77
import numpy as np
88
from . import CONN_INFO_ROOT, connection_root, connection_test
9-
from .schemas.connection import schema, Subjects
9+
10+
from . import PREFIX
11+
import pytest
12+
13+
14+
@pytest.fixture
15+
def schema(connection_test):
16+
schema = dj.Schema(PREFIX + "_transactions", locals(), connection=connection_test)
17+
yield schema
18+
schema.drop()
19+
20+
21+
@pytest.fixture
22+
def Subjects(schema):
23+
@schema
24+
class Subjects(dj.Manual):
25+
definition = """
26+
#Basic subject
27+
subject_id : int # unique subject id
28+
---
29+
real_id : varchar(40) # real-world name
30+
species = "mouse" : enum('mouse', 'monkey', 'human') # species
31+
"""
32+
33+
yield Subjects
34+
Subjects.drop()
1035

1136

1237
def test_dj_conn():

0 commit comments

Comments
 (0)