File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 11from typing import Optional
22
3+ from typeguard import typechecked
4+
35from fox_goose_corn .src .model .cargo_item import AbstractCargoItem
46from fox_goose_corn .src .model .river import RiverSide
57
68
9+ @typechecked
710class Boat :
811 _current_side : RiverSide = RiverSide .FARM_SIDE
912 _cargo_item : Optional [AbstractCargoItem ] = None
Original file line number Diff line number Diff line change @@ -39,12 +39,13 @@ def test_boat_can_take_cargo(self, cargo_item_type):
3939
4040 boat .add_cargo (cargo_item )
4141
42- def test_boat_can_only_take_expected_cargo_types (self ):
43- boat = Boat ()
44- cargo_item = Boat ()
45-
46- with pytest .raises (InvalidCargoItemException ):
47- boat .add_cargo (cargo_item )
42+ # Not needed if using typechecked
43+ # def test_boat_can_only_take_expected_cargo_types(self):
44+ # boat = Boat()
45+ # cargo_item = Boat()
46+ #
47+ # with pytest.raises(InvalidCargoItemException):
48+ # boat.add_cargo(cargo_item)
4849
4950 def test_boat_cannot_take_more_than_one_cargo_item (self ):
5051 boat = Boat ()
You can’t perform that action at this time.
0 commit comments