From 885ede70330f6c19ff46a8a07d0a30c50b2a6023 Mon Sep 17 00:00:00 2001 From: Chen Kasirer Date: Mon, 30 Sep 2024 10:54:41 +0200 Subject: [PATCH] maybe maybe maybe --- tests/compas/test_plugins.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/tests/compas/test_plugins.py b/tests/compas/test_plugins.py index 81d9dd145f3..b3f830161e6 100644 --- a/tests/compas/test_plugins.py +++ b/tests/compas/test_plugins.py @@ -2,6 +2,7 @@ import pytest +import compas from compas.plugins import IncompletePluginImplError from compas.plugins import PluginValidator @@ -38,14 +39,19 @@ def test_ensure_implementations_with_valid_impl(): PluginValidator.ensure_implementations(CompleteImpl) -def test_dot_net_exception(): - import compas - from compas.plugins import DotNetException +if not compas.IPY: - assert DotNetException is not None - if compas.RHINO: + def test_dot_net_exception(): + from compas.plugins import DotNetException + + assert DotNetException is not None + assert isinstance(DotNetException(), BaseException) + + +if compas.IPY: + + def test_dot_new_exception_ipy(): import System.Exception + from compas.plugins import DotNetException assert DotNetException is System.Exception - else: - assert isinstance(DotNetException(), BaseException)