class _Common(unittest.TestCase): """A basic class that makes it easier to write unittests.""" def setUp(self): """Create a fresh USD lexer class before each test runs.""" self.lexer = UsdLexer() def _get(self, code): """Tokenize the code into its unique parts. :param code: The USD source code to split up. :type code: str :returns: The tokenized pieces. :rtype: list[:class:`pygments.token._TokenType`] """ return list(self.lexer.get_tokens(code))
def setUp(self): """Create a fresh USD lexer class before each test runs.""" self.lexer = UsdLexer()