Skip to content
This repository was archived by the owner on May 18, 2025. It is now read-only.

Conversation

mSaurabh
Copy link

Overview:
I am setting up initial tests that can be run before pushing your code to ensure no breaking changes.

Run the Pytest command. It will automatically look for files with the test_ prefix and run them.

This PR does not include an exhaustive list of all tests, but it will allow us to use it as a stepping stone for any future features.

Here's a sample output when you run the command pytest --verbose
Screenshot 2024-10-29 at 9 26 39 PM

@nfoert
Copy link
Owner

nfoert commented Oct 31, 2024

Thanks for working on this! My apologies for the delay, I may not be able to merge this in time for you to get hacktoberfest credit...

I'm having an issue with testing this, I'm getting a django.core.exceptions.ImproperlyConfigured error as shown in the below screenshot. Am I doing something wrong when testing this locally? A little research showed that perhaps there's a missing pytest.ini file?
image

Additionally @ar4s already created a few basic tests here using the default Django way. I do think pytest might be cleaner or easier to work on, do you know of any benefits of using one over the other? I've not done work with testing before
I also found pytest-django which seems to add some useful features for testing. Perhaps this might be useful?

@nfoert nfoert added the hacktoberfest A good issue for hacktoberfest 2024 label Oct 31, 2024
@mSaurabh
Copy link
Author

Let me get back to you on this. @nfoert

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
hacktoberfest A good issue for hacktoberfest 2024
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants