Maybe clean tests
ringabout opened this issue · comments
- likewise with nim-lang#16101:
git diff --color-moved --color-moved-ws=ignore-all-space cbc793b^..cbc793b | grep '\binclude\b'
+include parsecsv
+include stats
+include uri
=> use similar technique to transform those into import
- another thing would be a giant
s/assert/doAssert/
undertests/
; curious which cases would need to stay asassert
, besides maybe a test that actually tests for assert (eg in tests/assert/tassert.nim or such)
(refs: timotheecour#64 (comment))
- clean unittest style
clean unittest style
can you clarify what you mean?
eg,
suite "Bacon":
test ">:)":
check(foo == bar)
I'd write it as:
block: # Bacon
check foo == bar
(but not necessarily doAssert foo == bar
)
which adhers to the principle of: "only print something if there's something wrong", unlike suite "Bacon":
which outputs [suite] Bacon
regardless if test pass/failed, and is more informative than doAssert foo == bar
when test fails