Skip to content

Commit 2460f25

Browse files
committed
Getting started with pytest.
1 parent be51149 commit 2460f25

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

apps/py/.idea/dictionaries/screencaster.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/py/ch09_testing/lib.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ def __init__(self, name: str = None, price: float = 0.0,
1212

1313

1414
def all_guitars(style: Optional[str]) -> List[Guitar]:
15-
if not style or not style.strip():
16-
raise ValueError("'style' cannot be empty.")
17-
1815
style = style.lower()
1916

2017
log(f"Guitars for {style}")

apps/py/ch09_testing/test_lib.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
3+
def test_something():
4+
assert 7 == 7

apps/py/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ httpx
55
flask
66
sqlalchemy
77
requests
8+
pytest
9+
pytest-mock
10+
pytest-clarity

0 commit comments

Comments
 (0)