diff options
author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2014-11-15 17:21:38 +0200 |
---|---|---|
committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2014-11-15 17:21:38 +0200 |
commit | 05ffa4a548380f5de416ac398e042a18a729adc9 (patch) | |
tree | f23fd524163c39590fbbd2c79b6dd107502cbbb2 /testutils.py | |
parent | 769077db8f8674bac1250db6acb201493ba5d2e3 (diff) | |
download | pylint-05ffa4a548380f5de416ac398e042a18a729adc9.tar.gz |
Move tokenize_str from tests to testutils.
Diffstat (limited to 'testutils.py')
-rw-r--r-- | testutils.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/testutils.py b/testutils.py index 0b1b967..a892258 100644 --- a/testutils.py +++ b/testutils.py @@ -22,6 +22,7 @@ import functools import sys import re import unittest +import tokenize from glob import glob from os import linesep, getcwd, sep @@ -368,3 +369,6 @@ def make_tests(input_dir, msg_dir, filter_rgx, callbacks): if test: tests.append(test) return tests + +def tokenize_str(code): + return list(tokenize.generate_tokens(StringIO(code).readline)) |