Skip to content

Conversation

bobleesj
Copy link
Contributor

@bobleesj bobleesj commented Sep 7, 2024

43 tests are passing, same as before and after moving the tests.

Run via:

pytest

...

43 passed, 2 warnings in 0.43s 

Copy link

codecov bot commented Sep 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (3d94e42) to head (19a7da8).
Report is 29 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.


##############################################################################
class TestLoadData(unittest.TestCase):
@pytest.fixture(autouse=True)
Copy link
Contributor Author

@bobleesj bobleesj Sep 7, 2024

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

Source: https://stackoverflow.com/a/66222108

@@ -1,3 +1 @@
[pytest]
testpaths= src/diffpy/utils/tests
python_files = test_*.py
Copy link
Contributor Author

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_.

Copy link
Contributor Author

@bobleesj bobleesj left a comment

Choose a reason for hiding this comment

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

Please review!

@bobleesj bobleesj marked this pull request as ready for review September 7, 2024 18:59
@bobleesj
Copy link
Contributor Author

bobleesj commented Sep 7, 2024

============================= test session starts ==============================

plugins: mock-3.14.0, env-1.1.3
collecting ... collected 43 items

tests/test_diffraction_objects.py::test_diffraction_objects_equality[inputs10-inputs20-True] PASSED [  2%]

...

tests/test_tools.py::test_get_package_info[inputs3-expected3] PASSED     [100%]

=============================== warnings summary ===============================

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

Copy link
Contributor

@sbillinge sbillinge left a 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.

@bobleesj
Copy link
Contributor Author

bobleesj commented Sep 7, 2024

Screenshot 2024-09-07 at 4 27 58 PM

@sbillinge I think the test files have removed via git mv already. Could you please double-check?

@sbillinge sbillinge merged commit 6b441ad into diffpy:main Sep 8, 2024
3 of 4 checks passed
@sbillinge
Copy link
Contributor

@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.

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