Skip to content

Commit 0116c6f

Browse files
committed
add new rawfile to test
1 parent f0df8be commit 0116c6f

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

test_data/Angiotensin_AllScans.raw

9.28 MB
Binary file not shown.

tests/test_collision_energy.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,22 @@ def test_isolation_width(raw_file):
6363
reaction = scan_event.get_reaction(0)
6464
assert reaction.isolation_width == pytest.approx(expected_width), f"Scan {scan_num} Reaction isolation width mismatch"
6565
assert reaction.isolation_width_offset == pytest.approx(0.0), f"Scan {scan_num} Reaction isolation width offset mismatch"
66+
67+
68+
@pytest.fixture(scope="session")
69+
def angiotensin_raw_file():
70+
path = os.path.join("test_data", "Angiotensin_AllScans.raw")
71+
if not os.path.exists(path):
72+
pytest.skip(f"Test file {path} not found")
73+
raw = RawFile(path)
74+
yield raw
75+
raw.close()
76+
77+
def test_isolation_width_angiotensin(angiotensin_raw_file):
78+
scan_event = angiotensin_raw_file.get_scan_event_for_scan_number(3)
79+
actual_width = scan_event.get_isolation_width(0)
80+
assert actual_width == pytest.approx(2.0), "Scan 3 ScanEvent isolation width mismatch"
81+
82+
reaction = scan_event.get_reaction(0)
83+
assert reaction.isolation_width == pytest.approx(2.0), "Scan 3 Reaction isolation width mismatch"
84+
assert reaction.isolation_width_offset == pytest.approx(0.0), "Scan 3 Reaction isolation width offset mismatch"

0 commit comments

Comments
 (0)