Skip to content

Commit

Permalink
set raw_timestamps=True when reading files
Browse files Browse the repository at this point in the history
  • Loading branch information
jimkring committed Jan 24, 2024
1 parent 5cd13a9 commit d2bbddd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions nptdms/test/test_example_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,14 @@ def test_defragment(tdms_file):
# verify we can defragment a file with raw timestamps
TdmsWriter.defragment(test_file_path, output_file)

# rewind output file BytesIO instance and read it back in as a TdmsFile
# rewind output file BytesIO instance, so it can read it back in as a TdmsFile
output_file.seek(0)
output_tdms = tdms.TdmsFile(output_file)

# verify that both TdmsFile objects are the same
tdms_files_assert_equal(tdms.TdmsFile(test_file_path), output_tdms)
tdms_files_assert_equal(
tdms.TdmsFile(test_file_path, raw_timestamps=True),
tdms.TdmsFile(output_file, raw_timestamps=True),
)


def test_big_endian_format():
Expand Down

0 comments on commit d2bbddd

Please sign in to comment.