From d2bbdddea6ebf0da204cdac391153ae2988afe33 Mon Sep 17 00:00:00 2001 From: Jim Kring Date: Wed, 24 Jan 2024 13:07:22 -0800 Subject: [PATCH] set raw_timestamps=True when reading files --- nptdms/test/test_example_files.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nptdms/test/test_example_files.py b/nptdms/test/test_example_files.py index 86daf00..9984a48 100644 --- a/nptdms/test/test_example_files.py +++ b/nptdms/test/test_example_files.py @@ -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():