Skip to content

Commit

Permalink
add test for timestamps round trip
Browse files Browse the repository at this point in the history
  • Loading branch information
jimkring committed Jan 24, 2024
1 parent 63cfe5f commit 8e0e9c5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nptdms/test/test_example_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ def test_defragment_raw_timestamps():
output_tdms = tdms.TdmsFile(output_file)
for group in input_tdms.groups():
for channel in group.channels():
# verify that both files' channel data are the same
np.testing.assert_equal(channel.data, output_tdms[group.name][channel.name].data)
# verify that both files' timestamps are the same
input_timestamps = channel.time_track()
output_timestamps = output_tdms[group.name][channel.name].time_track()
np.testing.assert_equal(input_timestamps, output_timestamps)


def test_big_endian_format():
Expand Down

0 comments on commit 8e0e9c5

Please sign in to comment.