Skip to content
Snippets Groups Projects
Commit c4b5fd72 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Improve tests for slicing

parent 32f54ee5
No related branches found
No related tags found
1 merge request!4Add first test for slicing
Pipeline #7706 passed with warnings
......@@ -313,6 +313,17 @@ class TestOfflineTracks(unittest.TestCase):
assert 5 == len(track_selection)
track_selection_2 = tracks[1:3]
assert 2 == len(track_selection_2)
for _slice in [
slice(0, 0),
slice(0, 1),
slice(0, 2),
slice(1, 5),
slice(3, -2)
]:
self.assertListEqual(
list(tracks.E[:,0][_slice]),
list(tracks[_slice].E[:,0])
)
class TestOfflineTrack(unittest.TestCase):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment