Skip to content

Commit 439e3ca

Browse files
committed
added unit test for error raised in Reference.plate_map for invalid plate name
1 parent 50378b8 commit 439e3ca

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_references.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import pytest
12

23
from alhambra_mixes import Reference
34

@@ -17,3 +18,11 @@ def test_idt():
1718
eq = (dfo == dfp).all()
1819
print(eq)
1920
assert eq.loc[["Well", "Sequence", "Concentration (nM)"]].all()
21+
22+
23+
def test_raise_error_if_plate_name_not_found():
24+
r_order = Reference.compile(("tests/data/holes-order.xlsx", "200 µM"))
25+
26+
# This should raise an error because the plate name "fake plate name" is not found in the reference
27+
with pytest.raises(ValueError):
28+
r_order.plate_map("fake plate name")

0 commit comments

Comments
 (0)