Skip to content

Commit

Permalink
Fix execenv.acceptdialogs issue
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRaybaut committed Mar 7, 2024
1 parent 8b61d4d commit 65267af
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions guidata/tests/dataset/test_all_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,21 @@ class Parameters(gds.DataSet):

def test_all_features():
"""Test all guidata item/group features"""
execenv.acceptdialogs = True
with qt_app_context():
prm1 = Parameters()
prm1.floatarray[:, 0] = np.linspace(-5, 5, 50)
execenv.print(prm1)

if prm1.edit():
prm1.edit()
with execenv.context(acceptdialogs=True):
with qt_app_context():
prm1 = Parameters()
prm1.floatarray[:, 0] = np.linspace(-5, 5, 50)
execenv.print(prm1)
prm1.view()

prm2 = Parameters.create(integer=10101010, string="Using create class method")
print(prm2)
if prm1.edit():
prm1.edit()
execenv.print(prm1)
prm1.view()

execenv.print("OK")
prm2 = Parameters.create(integer=10101010, string="Using `create`")
print(prm2)

execenv.print("OK")


if __name__ == "__main__":
Expand Down

0 comments on commit 65267af

Please sign in to comment.