diff --git a/common/test/utils.py b/common/test/utils.py index 860314a42b..c76db470f9 100644 --- a/common/test/utils.py +++ b/common/test/utils.py @@ -6,6 +6,7 @@ import sys from contextlib import contextmanager import moto +import pytest from django.dispatch import Signal from markupsafe import escape from mock import Mock, patch @@ -153,3 +154,13 @@ def normalize_repr(func): between worker processes. """ return reprwrapper(func) + + +# Decorator for skipping tests that are not ready to be run with Python 3.x. +# While we expect many tests to fail with Python 3.x as we transition, this +# is specifically for tests that rely on external or large scale fixes. It can +# be added to individual tests or test classes. +py2_only = pytest.mark.skipif( + sys.version_info > (3, 0), + reason="This test can only be run with Python 2.7, currently" +)