-
Notifications
You must be signed in to change notification settings - Fork 21
Move tests folder to top and use pytest to run all tests #96
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #96 +/- ##
==========================================
- Coverage 65.35% 0.00% -65.36%
==========================================
Files 18 10 -8
Lines 915 638 -277
==========================================
- Hits 598 0 -598
- Misses 317 638 +321 ☔ View full report in Codecov by Sentry. |
|
||
############################################################################## | ||
class TestLoadData(unittest.TestCase): | ||
@pytest.fixture(autouse=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trick to use @pytest.fixture
within unittest
class
@@ -1,3 +1 @@ | |||
[pytest] | |||
testpaths= src/diffpy/utils/tests | |||
python_files = test_*.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pytest automatically detects files starting with test_.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review!
Seems like the tests are passing while we probably need to update codecov and other CI files. Maybe shall we merge it a new branch like "folder" etc.? @sbillinge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests seem to still be in the src package. We want them all in tests at the top level, no?
When you move them please use git mv
so got just updates the path and doesn't delete and add the whole file.
![]() @sbillinge I think the test files have removed via |
@bobleesj this looks great, thanks. Sorry, before I was looking on my phone and didn't see the right-arrow showing the file move so I missed that it was all good. |
43 tests are passing, same as before and after moving the
tests
.Run via: