fediverse-devnet / feditest

A testing framework for distributed, heterogeneous systems communicating with complex protocols, such as the Fediverse
https://feditest.org/
MIT License
31 stars 6 forks source link

ZeroDivisionError with latest sandbox tests #298

Closed jernst closed 1 month ago

jernst commented 1 month ago

This is feditest develop against feditest-tests-sandbox with #15.

> cd feditest-tests-sandbox
> make -f Makefile.create FEDITEST=../feditest/venv.linux.develop/bin/feditest 
> make -f Makefile.run FEDITEST=../feditest/venv.linux.develop/bin/feditest 

stops with error.

Details:

> ../feditest/venv.linux.develop/bin/feditest -v -v convert-transcript --in examples/testresults/sandbox-all-clientA-vs-server1.json --html examples/testresults/sandbox-all-clientA-vs-server1.html
...
  File "/home/ubosdev/git/github.com/jernst/feditest/venv.linux.develop/lib/python3.11/site-packages/feditest/templates/default/partials/shared/summary.jinja2", line 50, in top-level template code
    <span class="percentage">({{ '%.1f' % ( summary.count_failures_for(feditest.SpecLevel.MUST, None) * 100.0 / summary.n_total ) }}%)</span>
    ^^^^^^^^^^^^^^^^^^^^^^^^^
ZeroDivisionError: float division by zero

This is caused by the transcript JSON that reports a TypeError (see separate issue). This should be fixed first.