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

Create Way to force package even if filepath exists #1026

Conversation

graingert
Copy link
Contributor

Fixes: #268

@graingert
Copy link
Contributor Author

graingert commented Sep 1, 2020

@nedbat it might be cleaner to do something with [paths] eg:

[coverage:run]
source=.

[coverage:paths]
.
.tox/*/lib/*/site-packages/**

should be able to get coverage to cover any file in .tox/*/lib/*/site-packages/** that matches a file in .

@nedbat
Copy link
Owner

nedbat commented Sep 2, 2020

15:23:42 nedbat: I'm getting 0 coverage here PyCQA/modernize@814a719#diff-380c6a8ebbbce17d55d50ef17d3cf906R60
15:24:17 nedbat: it seems to work when I set include = ./.tox/*/lib/*/site-packages/libmodernize/** but that doesn't show un-imported files
19:11:16 nedbat: PyCQA/modernize@a937136 this almost does what I want it finds all the files from libmodernize and it associates the files in tox site-packages with the source in the toxinidir
graingert> nedbat: it seems other people have this issue too https://stackoverflow.com/questions/58696476/tox-0-coverage#comment104421991_59072005 https://stackoverflow.com/questions/20292950/making-py-test-coverage-and-tox-work-together-init-py-in-tests-folder#comment112629840_41387398

@graingert graingert force-pushed the create-way-to-force-package-even-if-filepath-exists branch 2 times, most recently from 5043856 to 6b2ceb1 Compare September 2, 2020 18:59
coverage/control.py Outdated Show resolved Hide resolved
@graingert graingert force-pushed the create-way-to-force-package-even-if-filepath-exists branch 5 times, most recently from 1c2248a to ab23dc7 Compare September 2, 2020 21:26
@graingert graingert force-pushed the create-way-to-force-package-even-if-filepath-exists branch from ab23dc7 to e38cf50 Compare September 2, 2020 21:27
@nedbat nedbat merged commit ecd6ab1 into nedbat:master Sep 12, 2020
@graingert graingert deleted the create-way-to-force-package-even-if-filepath-exists branch September 12, 2020 23:28
@@ -926,6 +926,28 @@ def test_source_package_as_package_part_omitted(self):
self.filenames_not_in(lines, "p1b")
self.assertEqual(lines['p1c'], 0)

def test_ambigious_source_package_as_dir(self):
Copy link

Choose a reason for hiding this comment

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

ambiguous was probably intended here!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

Create Way to force package even if filepath exists
3 participants