Skip to content

Commit

Permalink
Inline tests and distribute with package (#552)
Browse files Browse the repository at this point in the history
* Move tests inline

* Add test responses to package

* Fix CI

---------

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
  • Loading branch information
rikroe and rikroe authored Aug 5, 2023
1 parent e5d6e18 commit 95cd1de
Show file tree
Hide file tree
Showing 53 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ relative_files = True
omit =
bimmer_connected/cli.py
bimmer_connected/coord_convert.py
bimmer_connected/tests/*

[report]
exclude_lines =
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
pip install -e .
- name: Test with pytest
run: |
pytest --cov=bimmer_connected --timeout=10 --cov-report=xml test
pytest --cov bimmer_connected --timeout 10 --cov-report xml --pyargs bimmer_connected
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand All @@ -53,7 +53,7 @@ jobs:
pip install -r requirements.txt -r requirements-test.txt
- name: Test with flake8
run: |
ruff --config=pyproject.toml bimmer_connected test
ruff --config=pyproject.toml bimmer_connected
black:
runs-on: ubuntu-latest
Expand All @@ -70,7 +70,7 @@ jobs:
pip install -r requirements.txt -r requirements-test.txt
- name: Test with black
run: |
black --check bimmer_connected test
black --check bimmer_connected
mypy:
runs-on: ubuntu-latest
Expand All @@ -87,7 +87,7 @@ jobs:
pip install -r requirements.txt -r requirements-test.txt
- name: Test with mypy
run: |
mypy bimmer_connected test
mypy bimmer_connected
docs:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
args:
- --safe
- --quiet
files: ^((bimmer_connected|test)/.+)?[^/]+\.py$
files: ^(bimmer_connected/.+)?[^/]+\.py$
- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
Expand All @@ -30,5 +30,5 @@ repos:
name: mypy
entry: mypy
additional_dependencies: [types-setuptools, "typing_extensions>=3.10.0.2,<5.0"]
files: ^(bimmer_connected|test)/.+\.py$
files: ^bimmer_connected/.+\.py$

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ console_scripts =
bimmerconnected = bimmer_connected.cli:main

[options.package_data]
bimmer_connected = py.typed
bimmer_connected =
py.typed
bimmer_connected/tests/responses/*

0 comments on commit 95cd1de

Please sign in to comment.