Skip to content

Commit

Permalink
Fix a test that had issues with a minor upgrade of Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhalter committed Oct 16, 2024
1 parent 6e5d5b7 commit e53359a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/test_inference/test_compiled.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import pytest

import jedi
from jedi.inference import compiled
from jedi.inference.compiled.access import DirectObjectAccess
from jedi.inference.gradual.conversion import _stub_to_python_value_set
Expand Down Expand Up @@ -81,9 +82,9 @@ def bar(self):
assert [c.name for c in Script(code).complete()] == ['__func__']


def test_time_docstring(Script):
def test_time_docstring():
import time
comp, = Script('import time\ntime.sleep').complete()
comp, = jedi.Script('import time\ntime.sleep').complete()
assert comp.docstring(raw=True) == time.sleep.__doc__
expected = 'sleep(secs: float) -> None\n\n' + time.sleep.__doc__
assert comp.docstring() == expected
Expand Down

0 comments on commit e53359a

Please sign in to comment.