mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-02-23 18:17:28 -08:00
Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
125 lines
5.0 KiB
Diff
125 lines
5.0 KiB
Diff
diff --git a/tests/farm/run/run_timid.py b/tests/farm/run/run_timid.py
|
|
index 0370cf84..4e3cf1ca 100644
|
|
--- a/tests/farm/run/run_timid.py
|
|
+++ b/tests/farm/run/run_timid.py
|
|
@@ -38,6 +38,10 @@ if os.environ.get('COVERAGE_TEST_TRACER', 'c') == 'c':
|
|
else:
|
|
# If the Python trace function is being tested, then regular running will
|
|
# also show the Python function.
|
|
- contains("out_timid/showtraceout.txt", "regular PyTracer")
|
|
+ #
|
|
+ # tox.ini deletes compiled c modules to make this test work, not feasible
|
|
+ # to do this from the ebuild environment
|
|
+ #contains("out_timid/showtraceout.txt", "regular PyTracer")
|
|
+ pass
|
|
|
|
clean("out_timid")
|
|
diff --git a/tests/test_concurrency.py b/tests/test_concurrency.py
|
|
index 578cc679..c875be86 100644
|
|
--- a/tests/test_concurrency.py
|
|
+++ b/tests/test_concurrency.py
|
|
@@ -11,6 +11,7 @@ import time
|
|
|
|
from flaky import flaky
|
|
|
|
+import unittest
|
|
import coverage
|
|
from coverage import env
|
|
from coverage.backward import import_local_file
|
|
@@ -255,22 +256,27 @@ class ConcurrencyTest(CoverageTest):
|
|
code = SIMPLE.format(QLIMIT=self.QLIMIT)
|
|
self.try_some_code(code, "thread", threading)
|
|
|
|
+ @unittest.skipIf(env.PY2, "eventlet tests don't work with python tracer on python2")
|
|
def test_eventlet(self):
|
|
code = (EVENTLET + SUM_RANGE_Q + PRINT_SUM_RANGE).format(QLIMIT=self.QLIMIT)
|
|
self.try_some_code(code, "eventlet", eventlet)
|
|
|
|
+ @unittest.skipIf(env.PY2, "eventlet tests don't work with python tracer on python2")
|
|
def test_eventlet_simple_code(self):
|
|
code = SIMPLE.format(QLIMIT=self.QLIMIT)
|
|
self.try_some_code(code, "eventlet", eventlet)
|
|
|
|
+ @unittest.skipIf(env.PY2, "gevent tests don't work with python tracer on python2")
|
|
def test_gevent(self):
|
|
code = (GEVENT + SUM_RANGE_Q + PRINT_SUM_RANGE).format(QLIMIT=self.QLIMIT)
|
|
self.try_some_code(code, "gevent", gevent)
|
|
|
|
+ @unittest.skipIf(env.PY2, "gevent tests don't work with python tracer on python2")
|
|
def test_gevent_simple_code(self):
|
|
code = SIMPLE.format(QLIMIT=self.QLIMIT)
|
|
self.try_some_code(code, "gevent", gevent)
|
|
|
|
+ @unittest.skip("greenlet tests don't work with python tracer")
|
|
def test_greenlet(self):
|
|
GREENLET = """\
|
|
from greenlet import greenlet
|
|
@@ -289,6 +295,7 @@ class ConcurrencyTest(CoverageTest):
|
|
"""
|
|
self.try_some_code(GREENLET, "greenlet", greenlet, "hello world\n42\n")
|
|
|
|
+ @unittest.skip("greenlet tests don't work with python tracer")
|
|
def test_greenlet_simple_code(self):
|
|
code = SIMPLE.format(QLIMIT=self.QLIMIT)
|
|
self.try_some_code(code, "greenlet", greenlet)
|
|
diff --git a/tests/test_filereporter.py b/tests/test_filereporter.py
|
|
index 91e47762..121c3260 100644
|
|
--- a/tests/test_filereporter.py
|
|
+++ b/tests/test_filereporter.py
|
|
@@ -4,6 +4,7 @@
|
|
"""Tests for FileReporters"""
|
|
|
|
import os
|
|
+import unittest
|
|
|
|
from coverage.plugin import FileReporter
|
|
from coverage.python import PythonFileReporter
|
|
@@ -87,6 +88,7 @@ class FileReporterTest(UsingModulesMixin, CoverageTest):
|
|
assert acu < bcu and acu <= bcu and acu != bcu
|
|
assert bcu > acu and bcu >= acu and bcu != acu
|
|
|
|
+ @unittest.skip("we don't install zip eggs on gentoo")
|
|
def test_egg(self):
|
|
# Test that we can get files out of eggs, and read their source files.
|
|
# The egg1 module is installed by an action in igor.py.
|
|
diff --git a/tests/test_oddball.py b/tests/test_oddball.py
|
|
index aa2f333c..bc63395a 100644
|
|
--- a/tests/test_oddball.py
|
|
+++ b/tests/test_oddball.py
|
|
@@ -405,7 +405,9 @@ class DoctestTest(CoverageTest):
|
|
# well with coverage. Nose fixes the problem by monkeypatching doctest.
|
|
# I want to be sure there's no monkeypatch and that I'm getting the
|
|
# doctest module that users of coverage will get.
|
|
- assert 'doctest' not in sys.modules
|
|
+
|
|
+ # gentoo is not running these tests via nose, so there is no monkeypatching
|
|
+ #assert 'doctest' not in sys.modules
|
|
|
|
def test_doctest(self):
|
|
self.check_coverage('''\
|
|
diff --git a/tests/test_process.py b/tests/test_process.py
|
|
index 62dc80a5..7fa9b2ba 100644
|
|
--- a/tests/test_process.py
|
|
+++ b/tests/test_process.py
|
|
@@ -620,11 +620,16 @@ class ProcessTest(CoverageTest):
|
|
print("FOOEY == %s" % os.getenv("FOOEY"))
|
|
""")
|
|
|
|
- fullcov = os.path.join(
|
|
- os.path.dirname(coverage.__file__), "fullcoverage"
|
|
- )
|
|
+ # we want to use the coverage module we are testing, not the system installation
|
|
+ paths = [
|
|
+ os.path.join(
|
|
+ os.path.dirname(coverage.__file__), "fullcoverage"
|
|
+ ),
|
|
+ os.path.dirname(os.path.dirname(coverage.__file__))
|
|
+ ]
|
|
self.set_environ("FOOEY", "BOO")
|
|
- self.set_environ("PYTHONPATH", fullcov)
|
|
+ self.set_environ("PYTHONPATH", ':'.join(paths))
|
|
+ print(paths)
|
|
out = self.run_command("python -m coverage run -L getenv.py")
|
|
self.assertEqual(out, "FOOEY == BOO\n")
|
|
data = coverage.CoverageData()
|