Skip to content
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

Fix file-specific test coverage #2540

Merged
merged 2 commits into from
Jan 28, 2025
Merged

Conversation

adamjstewart
Copy link
Collaborator

@calebrob6 does this fix the issue you reported? It works for me, but I'm not 100% sure it will always work for everyone. If you can figure out a way to break this I'll reach out to the pytest-cov developers because I really want this to work, especially as we increase the number of datasets.

@adamjstewart adamjstewart added this to the 0.6.3 milestone Jan 28, 2025
@github-actions github-actions bot added testing Continuous integration testing dependencies Packaging and dependencies labels Jan 28, 2025
@calebrob6
Copy link
Member

Nope, same error. Were you able to reproduce?

Similarly, there are a bunch of errors if I simply do pytest --cov=torchgeo.datasets.landcoverai.

@calebrob6
Copy link
Member

Tracking issue here #2541

@adamjstewart
Copy link
Collaborator Author

I'm not able to reproduce, it sometimes works for me and sometimes doesn't. I think we should reach out to the pytest-cov folks to get more explanation of what is and isn't supposed to work.

@adamjstewart adamjstewart marked this pull request as draft January 28, 2025 11:56
@calebrob6
Copy link
Member

calebrob6 commented Jan 28, 2025

You are saying that sometimes pytest --cov=torchgeo.datasets.landcoverai tests/datasets/test_landcoverai.py gives the same error that I got but sometimes it works as expected?

By the way, if I replace the contents of test_landcoverai.py with simply import torchvision I get the same answer.

@adamjstewart
Copy link
Collaborator Author

It's probably dataset specific. For example, advance works, but landcoverai fails.

@calebrob6
Copy link
Member

Advance doesn't work for me....
image

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jan 28, 2025
@adamjstewart adamjstewart marked this pull request as ready for review January 28, 2025 14:47
@adamjstewart adamjstewart merged commit f828c68 into microsoft:main Jan 28, 2025
19 checks passed
@adamjstewart adamjstewart deleted the tests/cov branch January 28, 2025 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Packaging and dependencies documentation Improvements or additions to documentation testing Continuous integration testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants