aboutsummaryrefslogtreecommitdiff
path: root/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests.py')
-rwxr-xr-xtests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests.py b/tests.py
index 74b325e..707111a 100755
--- a/tests.py
+++ b/tests.py
@@ -18,7 +18,10 @@
"""Tests the Checkstyle script used to run style checks on Java files."""
-from StringIO import StringIO
+try:
+ from StringIO import StringIO
+except ImportError:
+ from io import StringIO
import unittest
import checkstyle