Skip to content

//test:python3_coverage_test fails on FreeBSD #274

Closed

Description

@chrisnovakovic
# ./pleasew test
18:39:17.868 WARNING: xattrs are not supported on this filesystem, using fallbacks
Fail: //test:python3_coverage_test   2 passed   0 skipped   0 failed   2 errored Took 350ms
Error: ImportError in test_can_import_tracer
cannot import name 'tracer' from 'coverage' (/root/python-rules/plz-out/tmp/test/python3_coverage_test._test/run_1/python3_coverage_test.pex/third_party/python/coverage/__init__.py)
Traceback (most recent call last):
  File "test/python_coverage_test.py", line 26, in test_can_import_tracer
    from coverage import tracer
ImportError: cannot import name 'tracer' from 'coverage' (/root/python-rules/plz-out/tmp/test/python3_coverage_test._test/run_1/python3_coverage_test.pex/third_party/python/coverage/__init__.py)

Error: ReturnValue in python3_coverage_test
Test returned nonzero but reported no errors
exit status 1
Standard output:

Running tests...
----------------------------------------------------------------------
.E.
======================================================================
ERROR [0.001s]: test_can_import_tracer (test.python_coverage_test.PythonCoverageTest.test_can_import_tracer)
Test we can import the binary tracer module.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/python_coverage_test.py", line 26, in test_can_import_tracer
    from coverage import tracer
ImportError: cannot import name 'tracer' from 'coverage' (/root/python-rules/plz-out/tmp/test/python3_coverage_test._test/run_1/python3_coverage_test.pex/third_party/python/coverage/__init__.py)

----------------------------------------------------------------------
Ran 3 tests in 0.206s

FAILED (errors=1)

Generating XML reports...

//test:python3_coverage_test 4 tests run in 352ms; 2 passed, 2 errored
30 test targets and 61 tests run; 56 passed, 2 errored, 3 skipped.
Total time: 2.21s real, 2.82s compute.
Messages:
18:39:18.525   ERROR: //test:python3_coverage_test failed: Test returned nonzero but reported no errors

This isn't surprising, given that the built-in test runners don't contain a tracer extension module for coverage on FreeBSD. We probably ought to just skip test_can_import_tracer on FreeBSD.

Activity

  1. added a commit that references this issue on Nov 17, 2025
    4af8eeb
  2. added a commit that references this issue on Nov 17, 2025
    7544bcd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions