cirq.testing.only_test_in_python3

cirq.testing.only_test_in_python3(func)[source]

A decorator that indicates a test should not execute in python 2.

For example, in python 2 repr(‘a’) is “u’a’” instead of “‘a’” when
from future import unicode is present (which it will be, since 3to2
inserts it for us). This is annoying to work around when testing repr
methods, so instead you can just tag the test with this decorator.