]> https://gitweb.dealii.org/ - dealii.git/commitdiff
PythonWrappers: fall back to Release if Debug is unavailable 15652/head
authorMatthias Maier <tamiko@43-1.org>
Sat, 8 Jul 2023 04:40:45 +0000 (23:40 -0500)
committerMatthias Maier <tamiko@43-1.org>
Sat, 8 Jul 2023 05:50:51 +0000 (00:50 -0500)
contrib/python-bindings/tests/cell_accessor_wrapper.py
contrib/python-bindings/tests/manifold_wrapper.py
contrib/python-bindings/tests/mapping_wrapper.py
contrib/python-bindings/tests/point_wrapper.py
contrib/python-bindings/tests/quadrature_wrapper.py
contrib/python-bindings/tests/triangulation_wrapper.py

index 826170380f666388fb3289dd176d1ea44c2d60dc..0f823790162447efe19cd38921c60df66b82f303 100644 (file)
 # ---------------------------------------------------------------------
 
 import unittest
-from PyDealII.Debug import *
+
+try:
+    from PyDealII.Debug import *
+except ImportError:
+    from PyDealII.Release import *
 
 class TestCellAccessorWrapper(unittest.TestCase):
 
index 3ce9ef7cd0fe6d652083e758fce13d6ca3ff2331..98b2c0bc299d70bf2f5685109b19e7bfe6fa06a1 100644 (file)
 import math
 import os
 import unittest
-from PyDealII.Debug import *
+
+try:
+    from PyDealII.Debug import *
+except ImportError:
+    from PyDealII.Release import *
 
 class TestManifoldWrapperShell(unittest.TestCase):
 
index 4f403d091f8d9d615b859caa4da6027c18de2e87..7094242bdff57d94a2cd5d3ff314a3ceb8cc6c07 100644 (file)
 # ---------------------------------------------------------------------
 
 import unittest
-from PyDealII.Debug import *
+
+try:
+    from PyDealII.Debug import *
+except ImportError:
+    from PyDealII.Release import *
 
 class TestMappingWrapperCube(unittest.TestCase):
 
index 4c5a9390d85611026d9527f2fc0eaaf9a465a4c8..794b7c68b2b50346f0204ad2d6576743881d9ea9 100644 (file)
 
 import unittest
 import math
-from PyDealII.Debug import *
+
+try:
+    from PyDealII.Debug import *
+except ImportError:
+    from PyDealII.Release import *
 
 
 class TestPointWrapper(unittest.TestCase):
index 258f6b00d5e0cf2c4ef493543b0812132bffde5b..b93bc7055f631d4d9a23eb4b6e0056f237bdb395 100644 (file)
 # ---------------------------------------------------------------------
 
 import unittest
-from PyDealII.Debug import *
+
+try:
+    from PyDealII.Debug import *
+except ImportError:
+    from PyDealII.Release import *
 
 class TestQuadratureWrapper(unittest.TestCase):
 
     def test_gauss(self):
         quadrature = Quadrature(dim = 3)
         quadrature.create_gauss(n = 1);
-        
+
         w_sum = 0.
         for weight in quadrature.weights():
             w_sum += weight
-            
+
         self.assertTrue(abs(1. - w_sum) < 1e-10)
 
     def test_gauss_lobatto(self):
         quadrature = Quadrature(dim = 3)
         quadrature.create_gauss_lobatto(n = 2);
-        
+
         w_sum = 0.
         for weight in quadrature.weights():
             w_sum += weight
-            
+
         self.assertTrue(abs(1. - w_sum) < 1e-10)
 
 if __name__ == '__main__':
index fea7fc5b57295ec05a3701a3df4a5a59ffc58765..800be864e13140d00e5e03c9b1025c1cc69bc7f9 100644 (file)
 # ---------------------------------------------------------------------
 
 import unittest
-from PyDealII.Debug import *
+
+try:
+    from PyDealII.Debug import *
+except ImportError:
+    from PyDealII.Release import *
 
 class TestTriangulationWrapper(unittest.TestCase):
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.