aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/encoding.py
diff options
context:
space:
mode:
Diffstat (limited to 'libbe/encoding.py')
-rw-r--r--libbe/encoding.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/libbe/encoding.py b/libbe/encoding.py
index b0a04cc..d09117f 100644
--- a/libbe/encoding.py
+++ b/libbe/encoding.py
@@ -23,7 +23,10 @@ Support input/output/filesystem encodings (e.g. UTF-8).
import codecs
import locale
import sys
-import doctest
+
+import libbe
+if libbe.TESTING == True:
+ import doctest
ENCODING = None # override get_encoding() output by setting this
@@ -59,4 +62,5 @@ def set_IO_stream_encodings(encoding):
sys.stdout = codecs.getwriter(encoding)(sys.__stdout__)
sys.stderr = codecs.getwriter(encoding)(sys.__stderr__)
-suite = doctest.DocTestSuite()
+if libbe.TESTING == True:
+ suite = doctest.DocTestSuite()