miyuchina / mistletoe

A fast, extensible and spec-compliant Markdown parser in pure Python.
MIT License
791 stars 110 forks source link

test: unify assertEqual calls in all the tests #185

Closed pbodnar closed 1 year ago

pbodnar commented 1 year ago

It's easy and unified now (with no exceptions, right?! :)):

  1. As per unittest's documentation examples, actual always goes before expected.
  2. If used, actual is stored in a variable output for us.
  3. If used, variable expected is defined after the output variable.

For curious ones, Python (as well as the rest of the world) is not consistent here: https://stackoverflow.com/questions/40945126/parameter-order-for-unittest-testcase-assertequal.

coveralls commented 1 year ago

Coverage Status

coverage: 91.086%. remained the same when pulling 1a718d5b8d0c3abcb7aa44dde8a2a38c28fcf72c on unify-tests-asserts-on-equal into faed4f3aeb18cd930d8b0d3b12417cbb7882cc91 on master.

pbodnar commented 1 year ago

@anderskaplan, this might be of an interest for you. :)

anderskaplan commented 1 year ago

Looks good to me! 👍