From 01429f0216ca64c350876f0cd1df837b332f83f7 Mon Sep 17 00:00:00 2001 From: Florian Friesdorf Date: Wed, 18 Feb 2009 17:07:01 +0100 Subject: [PATCH] experimental DISABLE_DOCTEST --- src/paula/testing/testing.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/paula/testing/testing.py b/src/paula/testing/testing.py index 8e13f7a..1ee50b7 100644 --- a/src/paula/testing/testing.py +++ b/src/paula/testing/testing.py @@ -84,7 +84,13 @@ def scanfordoctest(file): if file.endswith('.txt'): pyfile = file.replace('.txt','.py') if os.path.isfile(pyfile): - return hasdoctests(file) + if hasdoctests(file): + # skip txt files that contain 'DISABLE_DOCTEST' + # this is for testing/evaluation, untested and might change + for line in open(file): + if line.lstrip().startswith('DISABLE_DOCTEST'): + return False + return True return False -- 2.11.4.GIT