You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ballot generation process requires that the program access external files, like PNG files. Although this process works on my Mac and Linux machines, these tests fail when running in GitHub Actions.
Error output:
Run poetry run pytest
============================= test session starts ==============================
platform linux -- Python 3.9.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/runner/work/BallotLabFork/BallotLabFork
plugins: cov-3.0.0
collected 12 items
tests/test_cli.py ...... [ 50%]
tests/test_demo.py F [ 58%]
tests/test_election_data.py ... [ 83%]
tests/test_make_ballots.py . [ 91%]
tests/test_validate_edf.py . [100%]
=================================== FAILURES ===================================
__________________________________ test_demo ___________________________________
def test_demo():
> assert make_demo_ballot() == NO_ERRORS
tests/test_demo.py:6:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/electos/ballotmaker/demo.py:11: in make_demo_ballot
build_ballot()
src/electos/ballotmaker/ballots/demo_ballot.py:126: in build_ballot
inst = Instructions()
src/electos/ballotmaker/ballots/instructions.py:182: in __init__
build_instruction_list()
src/electos/ballotmaker/ballots/instructions.py:63: in build_instruction_list
image1 = EmbeddedImage("filled_bubble.png", image_width)
src/electos/ballotmaker/ballots/images.py:25: in __init__
self.file_check(image_file)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <electos.ballotmaker.ballots.images.EmbeddedImage object at 0x7f44afb06610>
image_file = <electos.ballotmaker.ballots.files.FileTools object at 0x7f44afb06b20>
def file_check(self, image_file):
if image_file.file_found is False:
file_error = "File {} not found in {}".format(
self.image_name, self.rel_img_path
)
> raise FileNotFoundError(file_error)
E FileNotFoundError: File filled_bubble.png not found in assets/img
src/electos/ballotmaker/ballots/images.py:50: FileNotFoundError
=========================== short test summary info ============================
FAILED tests/test_demo.py::test_demo - FileNotFoundError: File filled_bubble....
========================= 1 failed, 11 passed in 0.44s =========================
Error: Process completed with exit code 1.
The text was updated successfully, but these errors were encountered:
The ballot generation process requires that the program access external files, like PNG files. Although this process works on my Mac and Linux machines, these tests fail when running in GitHub Actions.
Error output:
The text was updated successfully, but these errors were encountered: