Commit 60f673aa authored by Matias Guijarro's avatar Matias Guijarro
Browse files

fix issue 1924

parent a319da39
Pipeline #31630 failed with stages
in 68 minutes and 50 seconds
......@@ -410,7 +410,6 @@ class Session:
def _set_scan_saving(self, cls=None):
scan_saving.set_scan_saving_class(cls)
self.scan_saving = scan_saving.ScanSaving(self.name)
if is_bliss_shell():
self.env_dict["SCAN_SAVING"] = self.scan_saving
......@@ -656,8 +655,7 @@ class Session:
return ns
def setup(self, env_dict=None, verbose=False):
if get_current_session() is None:
set_current_session(self, force=True)
set_current_session(self, force=True)
if env_dict is None:
# use existing env dict
env_dict = get_current_session().env_dict
......
......@@ -387,3 +387,18 @@ def test_temp_export_axes(beacon):
assert set(axis_names).intersection(env) == set()
check_axes("roby", "robz")
def test_issue_1924(beacon):
s = beacon.get("test_session")
s.setup()
assert s.name == "test_session"
assert s.scan_saving.session == "test_session"
test_session_ss_info = s.scan_saving.__info__()
s2 = beacon.get("flint") # another session, can be any
s2.setup()
assert s2.name == "flint"
assert s2.scan_saving.session == "flint"
assert s2.scan_saving.__info__() != test_session_ss_info
s.close()
s2.close()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment