trouble with load_script
It seems like there are problems with load_script
and its behaviour in the bliss shell under certain (unclear) conditions:
- functions that are defined in scripts are not always found by jedi completion
- there is a typing helper bug when pressing SPACE-key directly after the name of a function that is defined in a script
- the problems above are likely to occur if beacon server runs on the same machine as the bliss shell and only occur together
- as said in the first sentence it is not always happening e.g. try
visible_func
in test_session...
in MR !1894 (merged) there are some lines of code to highlight the problem and tests fail due to this bug. Here are the most important code snippet:
tests/test_configuration/sessions/scripts/simple_script.py :
def test1():
print("TEST1")
tests/test_configuration/sessions/test_setup5.py :
load_script("simple_script")
running test_session5 :
$ bliss -s test_session5
TEST_SESSION5 [1]: te*TAB* <-no autocompletion suggestions
TEST_SESSION5 [1]: test1()
TEST1
TEST_SESSION5 [2]: test1*SPACE*
Unhandled exception in event loop:
File "/users/pithan/miniconda3/envs/bliss_jul25/lib/python3.7/site-packages/prompt_toolkit/eventloop/posix.py", line 154, in _run_task
t()
File "/users/pithan/miniconda3/envs/bliss_jul25/lib/python3.7/site-packages/prompt_toolkit/eventloop/context.py", line 115, in new_func
return func(*a, **kw)
File "/users/pithan/miniconda3/envs/bliss_jul25/lib/python3.7/site-packages/prompt_toolkit/application/application.py", line 562, in read_from_input
self.key_processor.process_keys()
File "/users/pithan/miniconda3/envs/bliss_jul25/lib/python3.7/site-packages/prompt_toolkit/key_binding/key_processor.py", line 273, in process_keys
...
The analysis for this issue was done together with @homsrego.
Edited by Linus Pithan