Skip to content

Commit

Permalink
Update test_buy_or_sell.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ikostan committed Dec 30, 2024
1 parent f8f20d7 commit 6ddff15
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions kyu_7/pointless_farmer/test_buy_or_sell.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@ class PointlessFarmerTestCase(unittest.TestCase):

@parameterized.expand([
([("apple", "orange"), ("orange", "pear"), ("apple", "pear")],
"apple", ["buy", "buy", "sell"]),
"apple", ["buy", "buy", "sell"]),
([("orange", "apple"), ("orange", "pear"), ("pear", "apple")],
"apple", ["sell", "buy", "buy"]),
"apple", ["sell", "buy", "buy"]),
([("apple", "orange"), ("pear", "orange"), ("apple", "pear")],
"apple", ["buy", "sell", "sell"]),
"apple", ["buy", "sell", "sell"]),
([("orange", "apple"), ("pear", "orange"), ("pear", "apple")],
"apple", ["sell", "sell", "buy"]),
"apple", ["sell", "sell", "buy"]),
([("orange", "apple"), ("orange", "pear"), ("apple", "pear")],
"apple", ["sell", "buy", "sell"]),
"apple", ["sell", "buy", "sell"]),
([("apple", "orange"), ("pear", "orange"), ("pear", "apple")],
"apple", ["buy", "sell", "buy"]),
"apple", ["buy", "sell", "buy"]),
([("apple", "orange"), ("orange", "pear"), ("pear", "apple")],
"apple", ["buy", "buy", "buy"]),
"apple", ["buy", "buy", "buy"]),
([("orange", "apple"), ("pear", "orange"), ("apple", "pear")],
"apple", ["sell", "sell", "sell"]),
"apple", ["sell", "sell", "sell"]),
([('Raspberry', 'Raspberry'), ('Jabuticaba', 'Raspberry'),
('Jabuticaba', 'Raspberry')], 'Raspberry', ['sell', 'sell', 'buy'])])
def test_buy_or_sell_positive(self, market, harvested_fruit, expected):
Expand Down Expand Up @@ -84,18 +84,18 @@ def test_buy_or_sell_positive(self, market, harvested_fruit, expected):

@parameterized.expand([
([("orange", "apple"), ("pear", "orange"), ("apple", "paer")],
"apple", "ERROR"),
"apple", "ERROR"),
([('Jackfruit', 'Physalis'), ('Physalis', 'Prune'),
('Prune', 'Tamarind')],
'Tamarind', 'ERROR'),
'Tamarind', 'ERROR'),
([('Mulberry', 'Strawberry'), ('Passionfruit', 'Mulberry'),
('Strawberry', 'Mulberry')],
'Strawberry', 'ERROR'),
'Strawberry', 'ERROR'),
([('Cherry', 'Cucumber'), ('Cherry', 'Cherry'), ('Cucumber', 'Ugli fruit')],
'Boysenberry', 'ERROR'),
'Boysenberry', 'ERROR'),
([('Jackfruit', 'Purple mangosteen'), ('Purple mangosteen', 'Jackfruit'),
('Purple mangosteen', 'Jackfruit')],
'Purple mangosteen', 'ERROR')])
'Purple mangosteen', 'ERROR')])
def test_buy_or_sell_negative(self, market, harvested_fruit, expected):
"""
Testing 'buy_or_sell' function, negative test case.
Expand Down

0 comments on commit 6ddff15

Please sign in to comment.