Closed
Description
I'm trying to work around #178 by running the tests by manually setting an IS_INTEGRATION
variable.
This is my .coveragerc
set up:
[run]
omit = *entrypoint*,*/tests/*
[coverage:run]
plugins =
coverage_conditional_plugin
[coverage:report]
skip_empty = true
omit = *entrypoint*,*/tests/*
[coverage:coverage_conditional_plugin]
rules =
"os_environ['IS_INTEGRATION'].lower()=='true'": integration
"os_environ['IS_INTEGRATION'].lower()=='false'": unit
And this is how I've annotated some methods:
@classmethod
def get(cls, value, joins=[]): # pragma: integration
primary_keys = cls.get_primary_key_names()
if not primary_keys or len(primary_keys) < 1:
return None
result = cls.find_all_by(primary_keys[0], value, joins)
try:
return result[0]
except:
return None
However, when running with IS_INTEGRATION='false'
, the method above is still flagged as uncovered:
Metadata
Metadata
Assignees
Labels
No labels