test_overview_popup_gui.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. from common import initialize_test_yml_list_measurement
  2. from view import VIEW
  3. from view.python_core.overviews import pop_show_overview
  4. def test_different_configs():
  5. """
  6. Testing different configurations of GUI pop up window for overviews
  7. """
  8. test_yml, test_animal, test_measu = initialize_test_yml_list_measurement()
  9. vo = VIEW()
  10. vo.update_flags_from_ymlfile(test_yml)
  11. vo.load_measurement_data(animal=test_animal, measu=test_measu)
  12. vo.calculate_signals()
  13. vo.update_flags({"CTV_Method": "22and35", "SO_individualScale": 3})
  14. pop_show_overview.description = "Testing defaults"
  15. yield pop_show_overview, vo.flags, vo.p1, "test", None, None
  16. for stim_nr, feature_nr in [([0], [0]), ([0], "all"), ("all", [0]), ("all", "all")]:
  17. pop_show_overview.description = f"Testing stimulus number={stim_nr} and feature number={feature_nr}"
  18. yield pop_show_overview, vo.flags, vo.p1, "test", stim_nr, feature_nr
  19. if __name__ == '__main__':
  20. for args in test_different_configs():
  21. args[0](*args[1:])
  22. input("Press any key to close figure and continue...")