summaryrefslogtreecommitdiff
path: root/python/subunit/tests/test_test_results.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/subunit/tests/test_test_results.py')
-rw-r--r--python/subunit/tests/test_test_results.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/subunit/tests/test_test_results.py b/python/subunit/tests/test_test_results.py
index 44f95b3..add30bb 100644
--- a/python/subunit/tests/test_test_results.py
+++ b/python/subunit/tests/test_test_results.py
@@ -20,7 +20,10 @@ import sys
import unittest
from testtools import TestCase
-from testtools.compat import StringIO
+try:
+ from testtools.compat import StringIO
+except ImportError:
+ from io import StringIO
from testtools.content import (
text_content,
TracebackContent,