From 04acd6d33ad40ea8ff731439e6d91d6626725780 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Tue, 13 Feb 2024 06:47:46 +0100 Subject: [PATCH] Update test_browser.py --- tests/project/test_browser.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/project/test_browser.py b/tests/project/test_browser.py index d38e4fb3..59c32dcf 100644 --- a/tests/project/test_browser.py +++ b/tests/project/test_browser.py @@ -56,8 +56,11 @@ def test_activate_gui(self): self.assertIsInstance(gui_pr, Project, msg="activate_gui should return a Project inherited from a pyiron_base Project.") for attribute in object.__dir__(self.project): - self.assertTrue(hasattr(gui_pr, attribute), - msg=f"GuiProject does not have the {attribute} attribute from the Project.") + try: + self.assertTrue(hasattr(gui_pr, attribute), + msg=f"GuiProject does not have the {attribute} attribute from the Project.") + except ImportError: # some attributes might have additional requirements like conda_environment + pass self.assertTrue(hasattr(gui_pr, 'browser'), msg="GuiProject does not have the added browser attribute.") self.assertIsInstance(gui_pr.browser, ProjectBrowser, msg='The browser attribute should return a ProjectBrowser')