Skip to content

Commit

Permalink
Merge pull request #881 from sanger/dependabot/pip/flake8-bugbear-24.2.6
Browse files Browse the repository at this point in the history
Bump flake8-bugbear from 23.7.10 to 24.2.6
  • Loading branch information
yoldas authored Mar 12, 2024
2 parents 1e431ec + 74df19d commit 2be79da
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
13 changes: 7 additions & 6 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def test_source_plate_uuid_value(app, source_plates):
SourcePlateUUID(PlateBarcode({})).value
SourcePlateUUID(PlateBarcode({"test": "another test"})).value

with raises(Exception):
with raises(Exception, match="Source plate with barcode '1234' not found"):
SourcePlateUUID(PlateBarcode({FIELD_EVENT_BARCODE: "1234"})).value

uuid = source_plates[0][FIELD_LH_SOURCE_PLATE_UUID]
Expand All @@ -395,7 +395,7 @@ def test_source_plate_uuid_errors(app, source_plates):

# After retrieval error
source_plate_property = SourcePlateUUID(PlateBarcode({FIELD_EVENT_BARCODE: "1234"}))
with raises(Exception):
with raises(Exception, match="Source plate with barcode '1234' not found"):
source_plate_property.value

assert len(source_plate_property.errors) > 0
Expand Down
7 changes: 3 additions & 4 deletions tests/helpers/test_dart.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def test_find_dart_source_samples_rows_not_found_barcode(app, dart_samples):

def test_exceptions_are_propagated_up(app, dart_samples):
with app.app_context():
with patch("lighthouse.db.dart.create_dart_connection", side_effect=Exception()):
with raises(Exception):
found = find_dart_source_samples_rows("unknown")
assert found is None
with patch("lighthouse.helpers.dart.create_dart_connection", side_effect=Exception("test exception")):
with raises(Exception, match="test exception"):
find_dart_source_samples_rows("unknown")

0 comments on commit 2be79da

Please sign in to comment.