test_metadata
Tests for frame metadata: tRange, fRange, leap seconds, CRC checksums.
TestCRCChecksum ¶
Tests for CRC checksum validation.
test_crc_validation_detects_corruption ¶
Test that CRC validation can detect corrupted frames.
Source code in gwframe/tests/test_metadata.py
test_data_integrity_after_crc_validation ¶
Test data integrity after successful CRC validation.
Source code in gwframe/tests/test_metadata.py
test_multiframe_crc_validation ¶
Test CRC validation for multi-frame files.
Source code in gwframe/tests/test_metadata.py
test_written_frames_have_crc ¶
Test that written frames include CRC checksums.
Source code in gwframe/tests/test_metadata.py
TestCompressionMetadata ¶
Tests for compression detection and preservation.
test_compression_detection ¶
Test compression detection for different schemes.
Source code in gwframe/tests/test_metadata.py
test_compression_empty_file_handling ¶
Test compression detection with file containing no data channels.
Source code in gwframe/tests/test_metadata.py
test_compression_multichannel_detection ¶
Test that get_info() correctly detects file-level compression.
Note: Small data arrays may not be compressed (appear as RAW) even when a compression scheme is specified, as compression may not be beneficial for very small datasets. The detection algorithm samples multiple channels and prefers non-RAW schemes to identify the intended file-level compression.
Source code in gwframe/tests/test_metadata.py
test_compression_multiframe_uniform ¶
Test that compression is uniform across all frames.
Source code in gwframe/tests/test_metadata.py
test_compression_roundtrip_preservation ¶
Test that compression is preserved in read-modify-write cycle.
Source code in gwframe/tests/test_metadata.py
test_compression_settings_property ¶
Test compression_settings property returns correct dict.
Source code in gwframe/tests/test_metadata.py
test_get_info_includes_compression ¶
Test that get_info() includes compression metadata.
Source code in gwframe/tests/test_metadata.py
TestFrameInfoMetadata ¶
Tests for frame info and metadata extraction.
test_get_channels ¶
Test get_channels() lists available channels.
Source code in gwframe/tests/test_metadata.py
test_get_channels_multiple_channels ¶
Test get_channels() with multiple channels.
Source code in gwframe/tests/test_metadata.py
test_get_info ¶
Test get_info() returns frame metadata.
Source code in gwframe/tests/test_metadata.py
test_get_info_multiframe ¶
Test get_info() with multi-frame file.
Source code in gwframe/tests/test_metadata.py
TestLeapSeconds ¶
Tests for leap second metadata in frames.
test_frame_uses_correct_leap_seconds ¶
Test that Frame uses correct leap seconds.
Source code in gwframe/tests/test_metadata.py
test_gpstime_from_float ¶
Test gpstime_from_float conversion.
Source code in gwframe/tests/test_metadata.py
test_leap_seconds_for_different_times ¶
Test leap seconds calculation for different GPS times.
Source code in gwframe/tests/test_metadata.py
test_leap_seconds_in_written_frame ¶
Test that leap seconds are correctly set in written frames.
Source code in gwframe/tests/test_metadata.py
TestTRangeFRange ¶
Tests for tRange and fRange metadata in FrProcData.
test_frange_equals_nyquist ¶
Test that fRange equals Nyquist frequency (sample_rate / 2).
Source code in gwframe/tests/test_metadata.py
test_trange_equals_duration ¶
Test that tRange equals duration.
Source code in gwframe/tests/test_metadata.py
test_trange_frange_different_sample_rates ¶
Test tRange and fRange with different sample rates.