Skip to content

Commit 80a04c4

Browse files
committed
Migrate tests from #1091 to pytest
1 parent 5948a41 commit 80a04c4

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

tests/test_blob_matlab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def insert_blobs(schema):
3434

3535
schema.connection.query(
3636
"""
37-
INSERT INTO {table_name} VALUES
37+
INSERT INTO {table_name} (`id`, `comment`, `blob`) VALUES
3838
(1,'simple string',0x6D596D00410200000000000000010000000000000010000000000000000400000000000000630068006100720061006300740065007200200073007400720069006E006700),
3939
(2,'1D vector',0x6D596D0041020000000000000001000000000000000C000000000000000600000000000000000000000000F03F00000000000030400000000000003F4000000000000047400000000000804E4000000000000053400000000000C056400000000000805A400000000000405E4000000000000061400000000000E062400000000000C06440),
4040
(3,'string array',0x6D596D00430200000000000000010000000000000002000000000000002F0000000000000041020000000000000001000000000000000700000000000000040000000000000073007400720069006E00670031002F0000000000000041020000000000000001000000000000000700000000000000040000000000000073007400720069006E0067003200),

tests/test_declare.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,3 +360,18 @@ class Table_With_Underscores(dj.Manual):
360360
dj.DataJointError, match="must be alphanumeric in CamelCase"
361361
) as e:
362362
schema_any(Table_With_Underscores)
363+
364+
365+
def test_hidden_attributes(schema_any):
366+
assert (
367+
list(Experiment().heading._attributes.keys())[-1].split("_")[2]
368+
== "timestamp"
369+
)
370+
assert (
371+
len([a for a in Experiment().heading._attributes.values() if a.is_hidden])
372+
!= 0
373+
)
374+
assert (
375+
len([a for a in Experiment().heading.attributes.values() if a.is_hidden])
376+
== 0
377+
)

0 commit comments

Comments
 (0)