Skip to content

First unit tests #280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 13, 2023
Merged

First unit tests #280

merged 4 commits into from
Apr 13, 2023

Conversation

PySimpleSQL
Copy link
Owner

Started on some Database tests. Also added a test for ProgressAnimate, along with the fixes to pass the tests.

Also, we need to turn ruff off for these, they will likely be all red :)

Going to try to keep related items in each file.  We will probably need a dataset_test.py, form_test.py, etc...
Not perfect yet, but shows the basic concepts of testing for both no failures and expected failures.  I tried to fix things in ProgressAnimate as I went along so that hopefully you can see the correlation between what was being tested, and the fixes that went in to pass the tests.

If you haven't used pytest before, there's a few things to do:
- pip install pytest
- make sure pysimplesql is reachable as a module.  The easiest way is to do a local installation by running `pip -e .` in the pysimplesql root directory
- from the commandline, run `pytest` to run all tests.  Or you can run tests for a specific file, I.e. `pytest progressanimate_test.py`
@ssweber ssweber changed the base branch from master to development April 13, 2023 10:33
Copy link
Collaborator

@ssweber ssweber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I just fixed the ruff issues, added ruff ignores, and resolved a small merge conflict.

@ssweber ssweber merged commit 4a04456 into development Apr 13, 2023
@ssweber ssweber deleted the pytest branch April 13, 2023 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants