summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2015-01-12 18:01:52 +0100
committerAnthon van der Neut <anthon@mnt.org>2015-01-12 18:01:52 +0100
commit680b278b1da87bd5bd6ef5c84f24e59f9a7ed23a (patch)
tree31620ef87264816b4a493ec5b9d79c7dbc068543
parent61cb7871d0f2824b99b45ff0eeba67ee8ae90972 (diff)
downloadruamel.std.argparse-680b278b1da87bd5bd6ef5c84f24e59f9a7ed23a.tar.gz
better message when running tests without installing package
-rw-r--r--README.rst8
-rw-r--r--test/test_argparse.py6
-rw-r--r--test/test_program.py5
3 files changed, 17 insertions, 2 deletions
diff --git a/README.rst b/README.rst
index 8c5d7cd..2fe1563 100644
--- a/README.rst
+++ b/README.rst
@@ -331,3 +331,11 @@ If you provide a True value to the optional help_all parameter for
then the commandline is checked for the option ``--help-all`` and the global
help is printed, follow by the help for each sub parsers, separated by a dashed
line.
+
+Testing
+-------
+
+Testing is done using the `tox <https://pypi.python.org/pypi/tox>`_, which
+uses `virtualenv <https://pypi.python.org/pypi/virtualenv>`_ and
+`pytest <http://pytest.org/latest/>`_.
+
diff --git a/test/test_argparse.py b/test/test_argparse.py
index 6c3d765..9cc818b 100644
--- a/test/test_argparse.py
+++ b/test/test_argparse.py
@@ -3,7 +3,11 @@
import pytest
-from ruamel.std.argparse import argparse, CountAction, SmartFormatter
+try:
+ from ruamel.std.argparse import argparse, CountAction, SmartFormatter
+except ImportError:
+ print("you have to install ruamel.std.argparse to run the tests")
+
from textwrap import dedent
diff --git a/test/test_program.py b/test/test_program.py
index 4ac1706..3d98b03 100644
--- a/test/test_program.py
+++ b/test/test_program.py
@@ -7,7 +7,10 @@ from __future__ import print_function
import sys
import pytest
-from ruamel.std.argparse import ProgramBase, option, sub_parser, version
+try:
+ from ruamel.std.argparse import ProgramBase, option, sub_parser, version
+except ImportError:
+ print("you have to install ruamel.std.argparse to run the tests")
class Program(ProgramBase):