1
0
forked from VimPlug/jedi

speed test to examples

This commit is contained in:
Dave Halter
2020-01-12 01:21:26 +01:00
parent cc34c7d4f3
commit 4f6116ac6e
3 changed files with 6 additions and 6 deletions

View File

@@ -2,9 +2,8 @@
addopts = --doctest-modules
# Ignore broken files in blackbox test directories
norecursedirs = .* docs completion refactor
scripts extensions speed static_analysis not_in_sys_path
jedi/third_party
norecursedirs = .* jedi/third_party scripts docs
test/completion test/refactor test/static_analysis
# Activate `clean_jedi_cache` fixture for all tests. This should be
# fine as long as we are using `clean_jedi_cache` as a session scoped

View File

@@ -6,7 +6,7 @@ should.
import time
import functools
from .helpers import cwd_at
from .helpers import cwd_at, get_example_dir
import jedi
@@ -50,9 +50,10 @@ def test_precedence_slowdown(Script):
Precedence calculation can slow down things significantly in edge
cases. Having strange recursion structures increases the problem.
"""
with open('speed/precedence.py') as f:
path = get_example_dir('speed', 'precedence.py')
with open(path) as f:
line = len(f.read().splitlines())
assert Script(path='speed/precedence.py').infer(line=line)
assert Script(path=path).infer(line=line)
@_check_speed(0.1)