1
0
forked from VimPlug/jedi

Making it possible for static analysis tests to be skipped if the python version doesn't match.

This commit is contained in:
Dave Halter
2015-12-22 17:37:28 +01:00
parent 515d096d33
commit 6bad5a924b
4 changed files with 32 additions and 11 deletions

View File

@@ -89,11 +89,15 @@ class StaticAnalysisCase(object):
The tests also start with `#!`, like the goto_definition tests.
"""
def __init__(self, path):
self.skip = False
self._path = path
with open(path) as f:
self._source = f.read()
self.skip = False
for line in self._source.splitlines():
self.skip = self.skip or run.skip_python_version(line)
def collect_comparison(self):
cases = []
for line_nr, line in enumerate(self._source.splitlines(), 1):