Skip to content

Commit 732f98c

Browse files
committed
TEST: Expect tag dtype matches PaddedInt
1 parent 46ad583 commit 732f98c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

bids/layout/tests/test_models.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
from bids.layout.models import (BIDSFile, Entity, Tag, Base, Config,
1515
FileAssociation, BIDSImageFile, LayoutInfo)
16+
from bids.layout.utils import PaddedInt
1617
from bids.tests import get_test_data_path
1718

1819

@@ -129,9 +130,11 @@ def test_tag_dtype(sample_bidsfile, subject_entity):
129130
Tag(f, e, '4', 'int'),
130131
Tag(f, e, '4', int),
131132
Tag(f, e, 4),
132-
Tag(file=f, entity=e, dtype=int, value='4')
133+
Tag(file=f, entity=e, dtype=int, value='4'),
134+
Tag(file=f, entity=e, dtype=int, value='04'),
133135
]
134-
assert all([t.dtype == int for t in tags])
136+
assert all(t.dtype == PaddedInt for t in tags)
137+
assert all(t.value == 4 for t in tags)
135138

136139

137140
def test_entity_add_file(sample_bidsfile):

0 commit comments

Comments
 (0)