Skip to content

Commit

Permalink
fix(api, shared-data): Regular expression used to split well into row…
Browse files Browse the repository at this point in the history
… and column did not allow a 0 column. (#7566)

closes #7531
  • Loading branch information
amitlissack authored Mar 30, 2021
1 parent be091a3 commit 1f6b11b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/tests/opentrons/protocols/context/test_well.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
["A1", "A", "1"],
["A10", "A", "10"],
["Z100", "Z", "100"],
["A0", "A", "0"],
["B0100", "B", "0100"]
])
def test_row_column(name, row, col):
w = WellImplementation(None, None, None, name=name)
Expand All @@ -17,11 +19,9 @@ def test_row_column(name, row, col):

@pytest.mark.parametrize(argnames=["name"],
argvalues=[
["A0"],
["a1"],
["Aa1"],
["A 1"],
["A0100"]
])
def test_row_column_fail(name):
with pytest.raises(AssertionError, match=f"could not match '{name}'"):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

# Regular expression to validate and extract row, column from well name
# (ie A3, C1)
WELL_NAME_PATTERN: Final[str] = r'^([A-Z]+)([1-9][0-9]*)$'
WELL_NAME_PATTERN: Final[str] = r'^([A-Z]+)([0-9]+)$'

0 comments on commit 1f6b11b

Please sign in to comment.