Skip to content

Commit b4f110d

Browse files
committed
remove schema
1 parent 748914f commit b4f110d

File tree

2 files changed

+14
-285
lines changed

2 files changed

+14
-285
lines changed

tests/schema_simple.py

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

tests/test_cli.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import subprocess
77
import pytest
88
import datajoint as dj
9-
from .schema_simple import schema
9+
from . import CONN_INFO_ROOT, PREFIX
1010

1111

1212
def test_cli_version(capsys):
@@ -92,8 +92,18 @@ def test_cli_args():
9292

9393

9494
def test_cli_schemas():
95+
schema = dj.Schema(PREFIX + "_cli", locals(), connection=dj.conn(**CONN_INFO_ROOT))
96+
97+
@schema
98+
class IJ(dj.Lookup):
99+
definition = """ # tests restrictions
100+
i : int
101+
j : int
102+
"""
103+
contents = list(dict(i=i, j=j + 2) for i in range(3) for j in range(3))
104+
95105
process = subprocess.Popen(
96-
["dj", "-s", "djtest_relational:test_schema"],
106+
["dj", "-s", "djtest_cli:test_schema"],
97107
stdin=subprocess.PIPE,
98108
stdout=subprocess.PIPE,
99109
stderr=subprocess.PIPE,
@@ -126,5 +136,5 @@ def test_cli_schemas():
126136
== stderr[159:200]
127137
)
128138
assert "'test_schema'" == stdout[4:17]
129-
assert "Schema `djtest_relational`" == stdout[22:48]
130-
assert fetch_res == json.loads(stdout[54:216].replace("'", '"'))
139+
assert "Schema `djtest_cli`" == stdout[22:41]
140+
assert fetch_res == json.loads(stdout[47:209].replace("'", '"'))

0 commit comments

Comments
 (0)