mhasoba / TheMulQuaBio

The interactive, online Multilingual Quantitative Biologist
MIT License
36 stars 81 forks source link

Issue on page /notebooks/05-Python_I.html #92

Closed Shuixin-Li closed 1 year ago

Shuixin-Li commented 1 year ago

Errors in your python code

Unit testing

test_control_flow.py

  """
  whenever a float is provided, then the closest integer is used:    
    >>> even_or_odd(3.2)
    '3 is Odd!'
  """

make me this output

1 items had failures:
   1 of   4 in __main__.even_or_odd
4 tests in 3 items.
3 passed and 1 failed.
***Test Failed*** 1 failures.

change 3.2 to 3, to get the following output, which is the output showed in the tutorial as well

ok
2 items had no tests:
    __main__
    __main__.main
1 items passed all tests:
   4 tests in __main__.even_or_odd
4 tests in 3 items.
4 passed and 0 failed.
Test passed.
mhasoba commented 1 year ago

Fixed, thanks!