-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the warnings/errors in a place that doesn't import anything.
- Loading branch information
Showing
4 changed files
with
50 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,47 @@ | ||
"""pytest-cov: avoid already-imported warning: PYTEST_DONT_REWRITE.""" | ||
|
||
__version__ = '5.0.0' | ||
|
||
import pytest | ||
|
||
|
||
class CoverageError(Exception): | ||
"""Indicates that our coverage is too low""" | ||
|
||
|
||
class PytestCovWarning(pytest.PytestWarning): | ||
""" | ||
The base for all pytest-cov warnings, never raised directly. | ||
""" | ||
|
||
|
||
class CovDisabledWarning(PytestCovWarning): | ||
""" | ||
Indicates that Coverage was manually disabled. | ||
""" | ||
|
||
|
||
class CovReportWarning(PytestCovWarning): | ||
""" | ||
Indicates that we failed to generate a report. | ||
""" | ||
|
||
|
||
class CovFailUnderWarning(PytestCovWarning): | ||
""" | ||
Indicates that we failed to generate a report. | ||
""" | ||
|
||
|
||
class CentralCovContextWarning(PytestCovWarning): | ||
""" | ||
Indicates that dynamic_context was set to test_function instead of using the builtin --cov-context. | ||
""" | ||
|
||
|
||
class DistCovError(Exception): | ||
""" | ||
Raised when dynamic_context is set to test_function and xdist is also used. | ||
See: https://github.com/pytest-dev/pytest-cov/issues/604 | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters