Skip to content

Commit

Permalink
Documentation only Testament unittest (nim-lang#16532)
Browse files Browse the repository at this point in the history
* Link Testament from unittest doc

* Update lib/pure/unittest.nim

Co-authored-by: flywind <[email protected]>

Co-authored-by: flywind <[email protected]>
  • Loading branch information
2 people authored and mildred committed Jan 11, 2021
1 parent c5f14de commit 4c70bbb
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions lib/pure/unittest.nim
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@

## :Author: Zahary Karadjov
##
## **Note**: Instead of ``unittest.nim``, please consider to use
## the ``testament`` tool which offers process isolation for your tests.
## Also ``when isMainModule: doAssert conditionHere`` is usually a
## much simpler solution for testing purposes.
##
## This module implements boilerplate to make unit testing easy.
##
## The test status and name is printed after any output or traceback.
Expand All @@ -22,9 +17,18 @@
## parent test as failed. Setup and teardown are inherited. Setup can be
## overridden locally.
##
## Compiled test files as well as ``nim c -r <testfile.nim>``
## Compiled test files as well as `nim c -r <testfile.nim>`
## exit with 0 for success (no failed tests) or 1 for failure.
##
## Testament
## =========
##
## Instead of `unittest`, please consider using
## `the Testament tool <testament.html>`_ which offers process isolation for your tests.
##
## Alternatively using `when isMainModule: doAssert conditionHere` is usually a
## much simpler solution for testing purposes.
##
## Running a single test
## =====================
##
Expand All @@ -39,7 +43,7 @@
## Running a single test suite
## ===========================
##
## Specify the suite name delimited by ``"::"``.
## Specify the suite name delimited by `"::"`.
##
## .. code::
##
Expand All @@ -50,7 +54,7 @@
##
## A single ``"*"`` can be used for globbing.
##
## Delimit the end of a suite name with ``"::"``.
## Delimit the end of a suite name with `"::"`.
##
## Tests matching **any** of the arguments are executed.
##
Expand Down Expand Up @@ -92,7 +96,7 @@
## discard v[4]
##
## echo "suite teardown: run once after the tests"
##
##
## Limitations/Bugs
## ================
## Since `check` will rewrite some expressions for supporting checkpoints
Expand Down

0 comments on commit 4c70bbb

Please sign in to comment.