-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement
FluentWorklist.transfer
method
With ``wash_scheme=None`` option.
- Loading branch information
1 parent
8f9a7a9
commit 9fcfb29
Showing
4 changed files
with
185 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import pytest | ||
|
||
from robotools.fluenttools.worklist import FluentWorklist | ||
from robotools.liquidhandling.labware import Labware | ||
|
||
|
||
class TestFluentWorklist: | ||
def test_transfer(self): | ||
A = Labware("A", 3, 4, min_volume=10, max_volume=200) | ||
A.add("A01", 100) | ||
with FluentWorklist() as wl: | ||
wl.transfer( | ||
A, | ||
"A01", | ||
A, | ||
"B01", | ||
50, | ||
) | ||
assert len(wl) == 3 | ||
a, d, w = wl | ||
assert a.startswith("A;") | ||
assert d.startswith("D;") | ||
assert w == "W1;" | ||
assert A.volumes[0, 0] == 50 | ||
pass | ||
|
||
def test_input_checks(self): | ||
A = Labware("A", 3, 4, min_volume=10, max_volume=200, initial_volumes=150) | ||
with FluentWorklist() as wl: | ||
with pytest.raises(ValueError, match="must be equal"): | ||
wl.transfer(A, ["A01", "B01", "C01"], A, ["A01", "B01"], 20) | ||
with pytest.raises(ValueError, match="must be equal"): | ||
wl.transfer(A, ["A01", "B01"], A, ["A01", "B01", "C01"], 20) | ||
with pytest.raises(ValueError, match="must be equal"): | ||
wl.transfer(A, ["A01", "B01"], A, "A01", [30, 40, 25]) | ||
pass | ||
|
||
def test_transfer_flush(self): | ||
A = Labware("A", 3, 4, min_volume=10, max_volume=200, initial_volumes=150) | ||
with FluentWorklist() as wl: | ||
wl.transfer(A, "A01", A, "B01", 20, wash_scheme=None) | ||
assert len(wl) == 3 | ||
assert wl[-1] == "F;" | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters