-
Notifications
You must be signed in to change notification settings - Fork 101
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
Add pytest for unit testing #103
Conversation
We had a discussion about testing the different ways for connection. Is this to support that? I guess that we need to clarify what is what with regards to the dbt package tests. Have the other adaptors anything like this? |
yes, this indeed is intended for testing the different ways for connection. I want to use it for #100. And more generally it can be used for testing the python code.
@swanderz : Could you have a look to see if the CI will run the python unit tests. |
@JCZuurmond looking like we're in the same boat as before w.r.t getting CI working from your fork. i just changed some settings, can you try pushing a new commit to see if my tweaks fixed things? |
the CI ran, the checks only show |
CI passes! |
@JCZuurmond this PR is much appreciated. I'm certainly a python testing and packaging newbie, so help in this area is great. I had originally assumed that the I think we're lucky that with the
But I'm unsure how the last two could be unit tests without also being integration tests... 🤷
as for this... I have no idea why there is only one check running instead of four.
a few asks -- can you add:
|
@swanderz : I can shoot in a first PR to for the unit tests. I was thinking to do some mocking to test the azure login methods.
This PR is ok to be merged in my opinion! |
dcd3160
to
af1a384
Compare
This PR adds pytest for unit testing.
I tried to follow the dbt setup as much as possible. They have a
unit
test folder with unit tests. I followed the pytest best practice to mimick the package structure as well.It is a little awkward since SQL tests and python tests are combined. The set-up expects the usually pytest directory structure in the
test/unit
folder - while the convention is to put those in thetests/
folder.