Skip to content

Commit

Permalink
Update tests: 1. automl.py (#1417)
Browse files Browse the repository at this point in the history
* Add: Dedicated fixtures location

* Add: Typing to conftest

* Fix: More typing

* Move: Dask fixtures to own location

* Move: backend to it's own fixture location

* Move: Automlstub thing to it's own fixture

* Fix: docstring warning in conftest

* Fix: Remove dead code

* Add: Functionality to skip marked `slow` tests

* Add: Fixture for getting datasets

* Update: Tests for automl.py w/ fixtures, cases, mocks

This commit (too much) focues on extending our pytest capabilities to
make things more modular. Notably, making a fixtures and mocks folders
for testing so there is a unified source of mocks and fixture locations.

Split the tests for automl.py into seperate sub files to allow for an
easier time discerning what is being tested where.

Introduces `pytest_cases` to allow for easier future
testing of properties.

Introduces cached automl models to allow for a quicker time testing
attributes while keeping tests seperate and distinct.

This also rearragnes `unittest` import unfortunatly which causes many
files to be touched.

* Doc: Add documentation about our testing to conftest.py

* Doc: Add a bit more on documenting of tests

* Fix: Add pytest-cases to test dependancies

* Fix: Broken tests

* Fix: Failing test

* Fix: Ordering of check in `_includes`

* Remove `_includes` and use sets instead

* Fix: Black

* Update: test workflow knows about `.pytest_cache`
  • Loading branch information
eddiebergman committed Aug 18, 2022
1 parent 37a89e5 commit d4dc780
Show file tree
Hide file tree
Showing 106 changed files with 2,968 additions and 1,909 deletions.
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ extend-exclude =
venv
.venv
build
autosklearn/automl_common
extend-ignore =
# No whitespace before ':' in [x : y]
E203
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ jobs:
- name: Check for files left behind by test
if: ${{ always() }}
run: |
# Deleting `.pytest_chache` as it's used during testing and not deleted
rm -rf ".pytest_cache"
before="${{ steps.status-before.outputs.BEFORE }}"
after="$(git status --porcelain -b)"
if [[ "$before" != "$after" ]]; then
Expand Down
Loading

0 comments on commit d4dc780

Please sign in to comment.