Lines 44-56
PATCHES=(
Link Here
|
44 |
"${FILESDIR}/fix-for-deprecation-warnings.patch" |
44 |
"${FILESDIR}/fix-for-deprecation-warnings.patch" |
45 |
) |
45 |
) |
46 |
|
46 |
|
|
|
47 |
src_prepare() { |
48 |
default |
49 |
|
50 |
# Mark tests which tamper with PYTHONPATH with xfail since they will fail |
51 |
# inside a portage build. Bug #597708 |
52 |
# Also mark tests which need internet access (which fails with feature |
53 |
# network-sandbox enabled). |
54 |
sed -i \ |
55 |
-e '/^def test_central_subprocess_change_cwd_with_pythonpath/ i\@pytest.mark.xfail(reason="Changing PYTHONPATH causes trouble inside of an emerge process")' \ |
56 |
-e '/^def test_dist_missing_data/ i\@pytest.mark.xfail(reason="internet access fails with feature network-sandbox enabled")' \ |
57 |
tests/test_pytest_cov.py |
58 |
} |
59 |
|
47 |
python_compile_all() { |
60 |
python_compile_all() { |
48 |
use doc && sphinx-build -b html docs _build/html |
61 |
use doc && sphinx-build -b html docs _build/html |
49 |
} |
62 |
} |
50 |
|
63 |
|
51 |
python_test() { |
64 |
python_test() { |
52 |
PYTHONPATH="${S}/tests:${BUILD_DIR}/lib" \ |
65 |
distutils_install_for_testing |
53 |
PYTEST_PLUGINS=${PN/-/_} \ |
66 |
PYTHONPATH="${S}/tests:${BUILD_DIR}/lib:${PYTHONPATH}" \ |
54 |
py.test -v -v -x || die "Tests failed under ${EPYTHON}" |
67 |
py.test -v -v -x || die "Tests failed under ${EPYTHON}" |
55 |
} |
68 |
} |
56 |
|
69 |
|