Commit 42df0fd6 authored by Guillaume HEUSCH's avatar Guillaume HEUSCH

[test] fixed test for map_labels

parent c8216718
Pipeline #26406 failed with stage
in 8 minutes and 40 seconds
......@@ -109,12 +109,18 @@ def test_map_labels():
labels = ['1', '4', '7']
from ..datasets import map_labels
new_labels = map_labels(labels)
new_labels = sorted(new_labels)
assert new_labels == ['0', '1', '2']
assert '0' in new_labels
assert '1' in new_labels
assert '2' in new_labels
#new_labels = sorted(new_labels)
#assert new_labels == ['0', '1', '2']
new_labels = map_labels(labels, start_index = 5)
new_labels = sorted(new_labels)
assert new_labels == ['5', '6', '7']
#new_labels = sorted(new_labels)
assert '5' in new_labels
assert '6' in new_labels
assert '7' in new_labels
#assert new_labels == ['5', '6', '7']
from torch.utils.data import Dataset
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment