diff --git a/tests/common.py b/tests/common.py index 11dd235..ddeb867 100644 --- a/tests/common.py +++ b/tests/common.py @@ -20,7 +20,7 @@ import sys try: assert sys.version_info >= (2, 7) import unittest -except: +except AssertionError: import unittest2 as unittest import yaml diff --git a/tests/test_cli.py b/tests/test_cli.py index bec7078..e903d57 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -27,7 +27,7 @@ import sys try: assert sys.version_info >= (2, 7) import unittest -except: +except AssertionError: import unittest2 as unittest from yamllint import cli diff --git a/tests/test_config.py b/tests/test_config.py index a23da10..7e719b1 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -24,7 +24,7 @@ import sys try: assert sys.version_info >= (2, 7) import unittest -except: +except AssertionError: import unittest2 as unittest from yamllint import cli diff --git a/tests/test_linter.py b/tests/test_linter.py index edd803f..6c7ae62 100644 --- a/tests/test_linter.py +++ b/tests/test_linter.py @@ -19,7 +19,7 @@ import sys try: assert sys.version_info >= (2, 7) import unittest -except: +except AssertionError: import unittest2 as unittest from yamllint.config import YamlLintConfig diff --git a/tests/test_module.py b/tests/test_module.py index 678f40c..e7c78b3 100644 --- a/tests/test_module.py +++ b/tests/test_module.py @@ -22,7 +22,7 @@ import sys try: assert sys.version_info >= (2, 7) import unittest -except: +except AssertionError: import unittest2 as unittest diff --git a/tests/test_parser.py b/tests/test_parser.py index c5c51d8..7ed1f98 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -18,7 +18,7 @@ import sys try: assert sys.version_info >= (2, 7) import unittest -except: +except AssertionError: import unittest2 as unittest import yaml