summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2018-04-28 10:59:33 -0500
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2018-04-28 17:59:33 +0200
commitc1febf8d9c91790d04cac8d42775eb0e4d7d435a (patch)
treef5d8bf4fb5daead7c1cddd551dedc8d240eeec73 /lib
parent810fe884d0a8a778701306e7149b19c1cf0b6a73 (diff)
downloadspack-c1febf8d9c91790d04cac8d42775eb0e4d7d435a.tar.gz
spack-c1febf8d9c91790d04cac8d42775eb0e4d7d435a.tar.bz2
spack-c1febf8d9c91790d04cac8d42775eb0e4d7d435a.tar.xz
spack-c1febf8d9c91790d04cac8d42775eb0e4d7d435a.zip
Document how to run unit tests with print statements (#7860)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/docs/contribution_guide.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/spack/docs/contribution_guide.rst b/lib/spack/docs/contribution_guide.rst
index 2ef27131de..0f3dabd313 100644
--- a/lib/spack/docs/contribution_guide.rst
+++ b/lib/spack/docs/contribution_guide.rst
@@ -97,6 +97,13 @@ tests, run:
A more detailed list of available unit tests can be found by running
``spack test --long-list``.
+By default, ``pytest`` captures the output of all unit tests. If you add print
+statements to a unit test and want to see the output, simply run:
+
+.. code-block:: console
+
+ $ spack test -s -k architecture
+
Unit tests are crucial to making sure bugs aren't introduced into Spack. If you
are modifying core Spack libraries or adding new functionality, please consider
adding new unit tests or strengthening existing tests.