Skip to content

Commit

Permalink
Add a stubbed test for find_best_prices
Browse files Browse the repository at this point in the history
  • Loading branch information
wizzardx committed Jan 12, 2025
1 parent 471b430 commit ef5206a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
8 changes: 6 additions & 2 deletions src/pricescoutai/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
def hello() -> str:
return "Hello from pricescoutai!"

def find_best_prices(query: str):
"""
Placeholder function that will eventually return the best prices for the given query.
"""
return {"error": "Functionality not implemented yet"}
21 changes: 6 additions & 15 deletions tests/test_price_scouter.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
from pricescoutai import ProductParser
from pricescoutai import find_best_prices

def test_example():
assert False, "This is a failing test to get started!"

def test_parse_description():
description = "Nylon Braided 3-in-1 Multi-Charging Cable"
expected = {
'type': '3-in-1 Multi-Charging Cable',
'features': ['Nylon Braided', 'USB Power Mode', '≤36V Operating Voltage'],
'compatible_devices': ['iPhone', 'Android']
}
parser = ProductParser(description)
result = parser.parse_description()

assert result == expected
def test_find_best_prices():
query = "candy bars"
result = find_best_prices(query)
assert isinstance(result, dict), "Result should be a dictionary"
assert "error" in result, "Result should indicate that functionality is not implemented yet"

0 comments on commit ef5206a

Please sign in to comment.