From: lkcl Date: Thu, 26 Mar 2020 20:42:15 +0000 (+0000) Subject: (no commit message) X-Git-Tag: convert-csv-opcode-to-binary~3059 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c3de6299ecba1411a20d31080697259f4f766e04;p=libreriscv.git --- diff --git a/HDL_workflow.mdwn b/HDL_workflow.mdwn index ab97903b2..293ca105a 100644 --- a/HDL_workflow.mdwn +++ b/HDL_workflow.mdwn @@ -765,6 +765,21 @@ However it is appreciated that writing formal proofs is a bit of a black art. This is where team collaboration particularly kicks in, so if you need help, ask on the mailing list. +## Don't comment out unit tests: add them first (as failures) and fix code later + +Unit tests serve an additional critical purpose of keeping track of code +that needs to be written. In many cases, you write the unit test *first*, +despite knowing full well that the code doesn't even exist or is completely +broken. The unit test then serves as a constant and important reminder +to actually fix (or write) the code. + +Therefore, *do not* comment out unit tests just because they "don't work". +If you absolutely must stop a unit test from running, **do not delete it**. +Simply mark it with an appropriate +["skip" decorator](https://docs.python.org/3/library/unittest.html#skipping-tests-and-expected-failures), +preferably with a link to a URL in the [bugtracker](http://bugs.libre-riscv.org) +with further details as to why the unit test should not be run. + # TODO Tutorials Find appropriate tutorials for nmigen and yosys, as well as symbiyosys.