diff options
-rw-r--r-- | Makefile | 2 | ||||
-rwxr-xr-x | ranger/ext/rifle.py | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile index c5818ee9..20cf6f25 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ doc: cleandoc test: @for FILE in $(shell grep -IHm 1 doctest -r ranger | cut -d: -f1); do \ echo "Testing $$FILE..."; \ - PYTHONPATH=".:"$$PYTHONPATH ${PYTHON} $$FILE; \ + RANGER_DOCTEST=1 PYTHONPATH=".:"$$PYTHONPATH ${PYTHON} $$FILE; \ done man: diff --git a/ranger/ext/rifle.py b/ranger/ext/rifle.py index 59351095..c0658c17 100755 --- a/ranger/ext/rifle.py +++ b/ranger/ext/rifle.py @@ -339,4 +339,8 @@ def main(): if __name__ == '__main__': - main() + if 'RANGER_DOCTEST' in os.environ: + import doctest + doctest.testmod() + else: + main() |