customize pyc tag based on implementation
This commit is contained in:
parent
639f35bbc4
commit
bc66cd85b1
|
@ -18,9 +18,15 @@ from _pytest.assertion import util
|
||||||
if hasattr(imp, "get_tag"):
|
if hasattr(imp, "get_tag"):
|
||||||
PYTEST_TAG = imp.get_tag() + "-PYTEST"
|
PYTEST_TAG = imp.get_tag() + "-PYTEST"
|
||||||
else:
|
else:
|
||||||
|
if hasattr(sys, "pypy_version_info"):
|
||||||
|
impl = "pypy"
|
||||||
|
elif sys.platform == "java":
|
||||||
|
impl = "jython"
|
||||||
|
else:
|
||||||
|
impl = "cpython"
|
||||||
ver = sys.version_info
|
ver = sys.version_info
|
||||||
PYTEST_TAG = "cpython-" + str(ver[0]) + str(ver[1]) + "-PYTEST"
|
PYTEST_TAG = "%s-%s%s-PYTEST" % (impl, ver[0], ver[1])
|
||||||
del ver
|
del ver, impl
|
||||||
|
|
||||||
class AssertionRewritingHook(object):
|
class AssertionRewritingHook(object):
|
||||||
"""Import hook which rewrites asserts."""
|
"""Import hook which rewrites asserts."""
|
||||||
|
|
Loading…
Reference in New Issue