Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Any Drill][Fixed] Do not overwrite other drill pair files #757

Closed
wants to merge 1 commit into from

Conversation

nguyen-v
Copy link

@nguyen-v nguyen-v commented Jan 2, 2025

This PR does the following:

  • fixes the case where PTH drill map files overwrite other drill pairs.
  • Handles the case where the pth_id is in the yaml file but left empty. Previously it was interpreted as a None string
  • Adds some more control for the drill map filename for other drill pairs.

@set-soft
Copy link
Member

set-soft commented Jan 2, 2025

Ok, can you provide examples for the fixes?
When is the "None" issue triggered? When is the overwrite triggered?

@nguyen-v
Copy link
Author

nguyen-v commented Jan 2, 2025

Running this config on the tests/board_samples/kicad_8/vias_test.kicad_pcb results in only 2 files generated:
vias_test-NPTH_drill_map.pdf and vias_test-PTH_map.pdf, because when specifying pth_id, other drill pairs are renamed in the same way as the PTH case.

kibot:
  version: 1

outputs:

  - name: excellon_drill
    comment: "Excellon drill files"
    type: excellon
    dir: Drill
    options:
      generate_drill_files: false
      pth_and_npth_single_file: false
      pth_id: @PTH_ID@
      map: 'pdf'

...
definitions:
  PTH_ID: PTH

Now when using this config, it results in these two files:
vias_test-NPTH_drill_map.pdf and vias_test-None_map.pdf
probably because how string substitution is done with empty fields.

kibot:
  version: 1

outputs:

  - name: excellon_drill
    comment: "Excellon drill files"
    type: excellon
    dir: Drill
    options:
      generate_drill_files: false
      pth_and_npth_single_file: false
      pth_id: @PTH_ID@
      map: 'pdf'

...
definitions:
  PTH_ID:

@nguyen-v
Copy link
Author

nguyen-v commented Jan 2, 2025

Also, in general where should I put the test cases? Do I just create a YAML file in yaml_samples and a project in board_samples? How are the outputs of the tests handled, do I just delete them before pushing?

@set-soft
Copy link
Member

set-soft commented Jan 2, 2025

Also, in general where should I put the test cases? Do I just create a YAML file in yaml_samples

Yes, test configs goes there.

and a project in board_samples?

Usually a PCB/SCH is enough, but yes test cases goes there.

How are the outputs of the tests handled, do I just delete them before pushing?

It depends on the test, a test must be added to the test script related to it. In this case tests/test_plot/test_drill.py.
In this case I think we need a more fine grained PR, you are addressing 2 bugs and adding a feature.
The original code never handled layer pairs, this is why they are wrongly interpreted as PTH files. So we need to address it in a PR and add a check to make sure the pairs are there.

@set-soft
Copy link
Member

set-soft commented Jan 2, 2025

I found the source of the "None" issue, is a general issue and shouldn't be fixed in the drill code.

set-soft added a commit that referenced this pull request Jan 2, 2025
Avoid interpreting them as the "None" string, now they are just None

See #757
@set-soft
Copy link
Member

set-soft commented Jan 2, 2025

The above patch fixes the "None" issue, note that now you get an error, the same you get by leaving empty the pth_id option.

@nguyen-v
Copy link
Author

nguyen-v commented Jan 2, 2025

In this case I think we need a more fine grained PR, you are addressing 2 bugs and adding a feature.
The original code never handled layer pairs, this is why they are wrongly interpreted as PTH files. So we need to address it in a PR and add a check to make sure the pairs are there.

Ok, should I open two separate PRs? One for the overwriting and one for the other drill pairs ID.
I'm trying to understand how to run the tests (e.g. test_drill.py) but I struggle to find the right command with pytest, could you give me some guidance on how to run the tests in general?

@set-soft
Copy link
Member

set-soft commented Jan 2, 2025

In this case I think we need a more fine grained PR, you are addressing 2 bugs and adding a feature.
The original code never handled layer pairs, this is why they are wrongly interpreted as PTH files. So we need to address it in a PR and add a check to make sure the pairs are there.

Ok, should I open two separate PRs? One for the overwriting and one for the other drill pairs ID.

Yes.

I'm trying to understand how to run the tests (e.g. test_drill.py) but I struggle to find the right command with pytest, could you give me some guidance on how to run the tests in general?

The Makefile handles it. Lets say you want to run the test_drill_3Rs test for KiCad 8, you can just run:

SINGLE_TEST=test_drill_3Rs make t1k8

For KiCad 7 you just use t1k7, to run all drill tests just use test_drill, this will match test_drill*

@nguyen-v
Copy link
Author

nguyen-v commented Jan 2, 2025

The Makefile handles it. Lets say you want to run the test_drill_3Rs test for KiCad 8, you can just run:

SINGLE_TEST=test_drill_3Rs make t1k8

For KiCad 7 you just use t1k7, to run all drill tests just use test_drill, this will match test_drill*

When running the command, I always get an assertion error:

~/KiBot$ SINGLE_TEST=test_drill_3Rs make t1k8
rm -rf pp
python3-coverage run src/kibot --help-list-outputs > /dev/null
/bin/sh: 1: python3-coverage: not found
make: [Makefile:203: single_test] Error 127 (ignored)
LANG=en pytest-3 --log-cli-level debug -k "test_drill_3Rs" --test_dir=pp
==================================================================================================================================================== test session starts ====================================================================================================================================================
platform linux -- Python 3.12.3, pytest-7.4.4, pluggy-1.4.0
rootdir: /home/vincent/KiBot
configfile: pytest.ini
collected 0 items / 24 errors

========================================================================================================================================================== ERRORS ===========================================================================================================================================================
_______________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_bom.py ________________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
__________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_dep_downloader.py __________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
______________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_drill.py _______________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
_______________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_dxf.py ________________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
______________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_gerber.py ______________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
_______________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_gui.py ________________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
_______________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_hpgl.py _______________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
_______________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_ibom.py _______________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
_____________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_int_bom.py ______________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
_______________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_kicad_config_errors.py ________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
______________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_kicost.py ______________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
_______________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_misc.py _______________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
______________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_misc_2.py ______________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
_____________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_pcbdraw.py ______________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
_______________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_pdf.py ________________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
_____________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_position.py _____________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
____________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_preflight.py _____________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
____________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_print_pcb.py _____________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
____________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_print_sch.py _____________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
________________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_ps.py ________________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
____________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_sch_errors.py ____________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
_______________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_step.py _______________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
_______________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_svg.py ________________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
___________________________________________________________________________________________________________________________________ ERROR collecting tests/test_plot/test_yaml_errors.py ____________________________________________________________________________________________________________________________________
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:995: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
tests/test_plot/__init__.py:9: in <module>
    from utils import context   # noqa: F401
tests/utils/context.py:26: in <module>
    assert shutil.which(COVERAGE_SCRIPT) is not None
E   AssertionError
================================================================================================================================================== short test summary info ==================================================================================================================================================
ERROR tests/test_plot/test_bom.py - AssertionError
ERROR tests/test_plot/test_dep_downloader.py - AssertionError
ERROR tests/test_plot/test_drill.py - AssertionError
ERROR tests/test_plot/test_dxf.py - AssertionError
ERROR tests/test_plot/test_gerber.py - AssertionError
ERROR tests/test_plot/test_gui.py - AssertionError
ERROR tests/test_plot/test_hpgl.py - AssertionError
ERROR tests/test_plot/test_ibom.py - AssertionError
ERROR tests/test_plot/test_int_bom.py - AssertionError
ERROR tests/test_plot/test_kicad_config_errors.py - AssertionError
ERROR tests/test_plot/test_kicost.py - AssertionError
ERROR tests/test_plot/test_misc.py - AssertionError
ERROR tests/test_plot/test_misc_2.py - AssertionError
ERROR tests/test_plot/test_pcbdraw.py - AssertionError
ERROR tests/test_plot/test_pdf.py - AssertionError
ERROR tests/test_plot/test_position.py - AssertionError
ERROR tests/test_plot/test_preflight.py - AssertionError
ERROR tests/test_plot/test_print_pcb.py - AssertionError
ERROR tests/test_plot/test_print_sch.py - AssertionError
ERROR tests/test_plot/test_ps.py - AssertionError
ERROR tests/test_plot/test_sch_errors.py - AssertionError
ERROR tests/test_plot/test_step.py - AssertionError
ERROR tests/test_plot/test_svg.py - AssertionError
ERROR tests/test_plot/test_yaml_errors.py - AssertionError
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 24 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
==================================================================================================================================================== 24 errors in 2.24s =====================================================================================================================================================
make: [Makefile:204: single_test] Error 2 (ignored)
******************** Output
#@cat pp/*/output.txt
******************** Error
tail: cannot open 'pp/*/error.txt' for reading: No such file or directory
make: *** [Makefile:208: single_test] Error 1

@set-soft
Copy link
Member

set-soft commented Jan 2, 2025

tests/utils/context.py:26: in
assert shutil.which(COVERAGE_SCRIPT) is not None

The python3-coverage tool is missing

@nguyen-v nguyen-v closed this Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants