Skip to content

Commit

Permalink
Merge pull request #172 from American-Soccer-Analysis/171-feature-req…
Browse files Browse the repository at this point in the history
…uest-switch-to-pytest-instead-of-behave

Switch to `pytest` instead of `behave`
  • Loading branch information
bgrnwd authored Jun 21, 2024
2 parents 9e062df + 8a3cbda commit 7444cfc
Show file tree
Hide file tree
Showing 11 changed files with 231 additions and 241 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
run: |
mypy itscalledsoccer
ruff check itscalledsoccer
- name: Behave tests
- name: Pytest
run: |
cd tests
behave
pytest
4 changes: 2 additions & 2 deletions itscalledsoccer/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(
]:
self.LOGGER.setLevel(getLevelName(logging_level.upper()))
else:
print(f"Logging level {logging_level} not recognized!")
self.LOGGER.info(f"Logging level {logging_level} not recognized!")

self.session = CACHE_SESSION
self.base_url = self.BASE_URL
Expand Down Expand Up @@ -77,7 +77,7 @@ def _get_entity(self, type: str) -> DataFrame:
DataFrame: _description_
"""
plural_type = f"{type}s" if type != "stadia" else f"{type}"
print(f"Gathering all {plural_type}")
self.LOGGER.info(f"Gathering all {plural_type}")
df = DataFrame([])
for league in self.LEAGUES:
url = f"{self.BASE_URL}{league}/{plural_type}"
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ dependencies = [
"rapidfuzz>=3.2.0",
"pandas>=2.0.3",
]
version = "1.1.0"
version = "1.2.0"

[project.urls]
Repository = "https://github.com/American-Soccer-Analysis/itscalledsoccer"

[project.optional-dependencies]
test = [
"types-requests",
"behave",
"pytest",
"mypy",
"ruff",
"mkdocs",
Expand Down
Empty file added tests/__init__.py
Empty file.
38 changes: 0 additions & 38 deletions tests/features/client.feature

This file was deleted.

19 changes: 0 additions & 19 deletions tests/features/entities.feature

This file was deleted.

6 changes: 0 additions & 6 deletions tests/features/environment.py

This file was deleted.

33 changes: 0 additions & 33 deletions tests/features/stats.feature

This file was deleted.

54 changes: 0 additions & 54 deletions tests/features/steps/client.py

This file was deleted.

84 changes: 0 additions & 84 deletions tests/features/steps/common_steps.py

This file was deleted.

Loading

0 comments on commit 7444cfc

Please sign in to comment.