mirror of
https://github.com/davidhalter/jedi.git
synced 2026-11-04 20:02:52 +08:00
add tests for attribute errors
This commit is contained in:
1 parent
284a64a79a
commit
7abdc375c2
2 files changed
+43
-3
No files matched your search
+4
-3
@@ -1,5 +1,6 @@
|
||||
import os
|
||||
import shutil
|
||||
import re
|
||||
import tempfile
|
||||
|
||||
import pytest
|
||||
@@ -96,9 +97,9 @@ class StaticAnalysisCase(object):
|
||||
def collect_comparison(self):
|
||||
cases = []
|
||||
for line_nr, line in enumerate(self._source.splitlines(), 1):
|
||||
if line.startswith('#! '):
|
||||
rest = line[3:]
|
||||
cases.append((line_nr + 1, rest))
|
||||
match = re.match(r'\s*#! (.*)$', line)
|
||||
if match is not None:
|
||||
cases.append((line_nr + 1, match.group(1)))
|
||||
return cases
|
||||
|
||||
def run(self, compare_cb):
|
||||
|
||||
Reference in new issue
Block a user