diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_signature.py b/python/helpers/pydev/_pydevd_bundle/pydevd_signature.py index 2ec20ed63b10..7ce6ba157db1 100644 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_signature.py +++ b/python/helpers/pydev/_pydevd_bundle/pydevd_signature.py @@ -83,9 +83,9 @@ class SignatureFactory(object): def is_in_scope(self, filename): return not pydevd_utils.not_in_project_roots(filename) - def create_signature(self, frame, with_args=True): + def create_signature(self, frame, filename, with_args=True): try: - filename, modulename, funcname = self.file_module_function_of(frame) + _, modulename, funcname = self.file_module_function_of(frame) signature = Signature(filename, funcname) if with_args: signature.set_args(frame, recursive=True) @@ -168,7 +168,7 @@ def create_signature_message(signature): def send_signature_call_trace(dbg, frame, filename): if dbg.signature_factory and dbg.signature_factory.is_in_scope(filename): - signature = dbg.signature_factory.create_signature(frame) + signature = dbg.signature_factory.create_signature(frame, filename) if signature is not None: if dbg.signature_factory.cache is not None: if not dbg.signature_factory.cache.is_in_cache(signature): @@ -186,7 +186,7 @@ def send_signature_call_trace(dbg, frame, filename): def send_signature_return_trace(dbg, frame, filename, return_value): if dbg.signature_factory and dbg.signature_factory.is_in_scope(filename): - signature = dbg.signature_factory.create_signature(frame, with_args=False) + signature = dbg.signature_factory.create_signature(frame, filename, with_args=False) signature.return_type = get_type_of_value(return_value, recursive=True) dbg.writer.add_command(create_signature_message(signature)) return True diff --git a/python/testData/dynamicTypes/1.py b/python/testData/dynamicTypes/1.py index e7c846b2c640..80e914df0ed9 100644 --- a/python/testData/dynamicTypes/1.py +++ b/python/testData/dynamicTypes/1.py @@ -1,4 +1,6 @@ def foo(x): return x -foo(1) \ No newline at end of file +foo(1) +from time import sleep +sleep(5) \ No newline at end of file diff --git a/python/testData/dynamicTypes/1_after.py b/python/testData/dynamicTypes/1_after.py index e647aea92013..51a0efca8f26 100644 --- a/python/testData/dynamicTypes/1_after.py +++ b/python/testData/dynamicTypes/1_after.py @@ -8,4 +8,6 @@ def foo(x): """ return x -foo(1) \ No newline at end of file +foo(1) +from time import sleep +sleep(5) \ No newline at end of file diff --git a/python/testSrc/com/jetbrains/env/python/PyDynamicTypesTest.java b/python/testSrc/com/jetbrains/env/python/PyDynamicTypesTest.java index dc7200855510..821dd70e9b9e 100644 --- a/python/testSrc/com/jetbrains/env/python/PyDynamicTypesTest.java +++ b/python/testSrc/com/jetbrains/env/python/PyDynamicTypesTest.java @@ -76,7 +76,7 @@ public class PyDynamicTypesTest extends PyEnvTestCase { waitForTerminate(); EdtTestUtil.runInEdtAndWait(() -> { - myFixture.configureByFile("dynamicTypes/" + scriptName); + myFixture.configureByFile(scriptName); try { //copy signature attributes from real file to temporary test file