| 1 |
From: Georges Khaznadar <[email protected]> |
| 2 |
Date: Sun, 7 Dec 2025 17:59:56 +0100 |
| 3 |
Subject: tools_unittest |
| 4 |
|
| 5 |
=================================================================== |
| 6 |
--- |
| 7 |
wxgeometrie/geolib/tests/test_angles.py | 4 ++-- |
| 8 |
wxgeometrie/geolib/tests/test_calcul_formel.py | 4 ++-- |
| 9 |
wxgeometrie/geolib/tests/test_cercles.py | 4 ++-- |
| 10 |
wxgeometrie/geolib/tests/test_courbes.py | 4 ++-- |
| 11 |
wxgeometrie/geolib/tests/test_feuille_IO.py | 4 ++-- |
| 12 |
wxgeometrie/geolib/tests/test_feuille_divers.py | 4 ++-- |
| 13 |
wxgeometrie/geolib/tests/test_feuille_noms.py | 4 ++-- |
| 14 |
wxgeometrie/geolib/tests/test_feuille_regressions.py | 4 ++-- |
| 15 |
wxgeometrie/geolib/tests/test_fonctions.py | 4 ++-- |
| 16 |
wxgeometrie/geolib/tests/test_interpolations.py | 4 ++-- |
| 17 |
wxgeometrie/geolib/tests/test_intersections.py | 4 ++-- |
| 18 |
wxgeometrie/geolib/tests/test_labels.py | 4 ++-- |
| 19 |
wxgeometrie/geolib/tests/test_lignes.py | 6 +++--- |
| 20 |
wxgeometrie/geolib/tests/test_objet.py | 4 ++-- |
| 21 |
wxgeometrie/geolib/tests/test_points.py | 4 ++-- |
| 22 |
wxgeometrie/geolib/tests/test_polygones.py | 4 ++-- |
| 23 |
wxgeometrie/geolib/tests/test_routines.py | 4 ++-- |
| 24 |
wxgeometrie/geolib/tests/test_textes.py | 4 ++-- |
| 25 |
wxgeometrie/geolib/tests/test_transformations.py | 4 ++-- |
| 26 |
wxgeometrie/geolib/tests/test_variables.py | 4 ++-- |
| 27 |
wxgeometrie/geolib/tests/test_vecteurs.py | 4 ++-- |
| 28 |
wxgeometrie/geolib/tests/test_widgets.py | 4 ++-- |
| 29 |
wxgeometrie/mathlib/tests/test_custom_objects.py | 4 ++-- |
| 30 |
wxgeometrie/mathlib/tests/test_internal_functions.py | 4 ++-- |
| 31 |
wxgeometrie/mathlib/tests/test_interprete.py | 6 ++++-- |
| 32 |
wxgeometrie/mathlib/tests/test_intervalles.py | 4 ++-- |
| 33 |
wxgeometrie/mathlib/tests/test_parsers.py | 4 ++-- |
| 34 |
wxgeometrie/mathlib/tests/test_solvers.py | 4 ++-- |
| 35 |
wxgeometrie/mathlib/tests/test_sympy.py | 4 ++-- |
| 36 |
wxgeometrie/mathlib/tests/test_universal_functions.py | 4 ++-- |
| 37 |
wxgeometrie/modules/probabilites/tests/test_repetition.py | 4 ++-- |
| 38 |
wxgeometrie/modules/tablatex/tests/test_tabsign.py | 4 ++-- |
| 39 |
wxgeometrie/modules/tablatex/tests/test_tabval.py | 4 ++-- |
| 40 |
wxgeometrie/modules/tablatex/tests/test_tabvar.py | 4 ++-- |
| 41 |
wxgeometrie/tests/test_entetes.py | 4 ++-- |
| 42 |
35 files changed, 73 insertions(+), 71 deletions(-) |
| 43 |
|
| 44 |
diff --git a/wxgeometrie/geolib/tests/test_angles.py b/wxgeometrie/geolib/tests/test_angles.py |
| 45 |
index 423fe55..a2f09ad 100644 |
| 46 |
--- a/wxgeometrie/geolib/tests/test_angles.py |
| 47 |
+++ b/wxgeometrie/geolib/tests/test_angles.py |
| 48 |
@@ -13,9 +13,9 @@ from wxgeometrie.geolib import ( |
| 49 |
) |
| 50 |
from wxgeometrie.mathlib.universal_functions import sin as u_sin, cos as u_cos, tan as u_tan |
| 51 |
|
| 52 |
-import wx_unittest |
| 53 |
+import tools.unittests |
| 54 |
|
| 55 |
-class GeolibTest(wx_unittest.TestCase): |
| 56 |
+class GeolibTest(tools.unittests.TestCase): |
| 57 |
|
| 58 |
def test_Secteur_angulaire(self): |
| 59 |
u = Vecteur_libre(5.458, -2.546) |
| 60 |
diff --git a/wxgeometrie/geolib/tests/test_calcul_formel.py b/wxgeometrie/geolib/tests/test_calcul_formel.py |
| 61 |
index 5febbf2..9618d88 100644 |
| 62 |
--- a/wxgeometrie/geolib/tests/test_calcul_formel.py |
| 63 |
+++ b/wxgeometrie/geolib/tests/test_calcul_formel.py |
| 64 |
@@ -66,9 +66,9 @@ def assert_eq(*args): |
| 65 |
print("'%s' equals to '%s', not '%s'." %(arg, repr(val), repr(expected))) |
| 66 |
assert TEST |
| 67 |
|
| 68 |
-import wx_unittest |
| 69 |
+import tools.unittests |
| 70 |
|
| 71 |
-class GeolibTest(wx_unittest.TestCase): |
| 72 |
+class GeolibTest(tools.unittests.TestCase): |
| 73 |
|
| 74 |
def test_Segment(self): |
| 75 |
A = Point('1/2', '3/4') |
| 76 |
diff --git a/wxgeometrie/geolib/tests/test_cercles.py b/wxgeometrie/geolib/tests/test_cercles.py |
| 77 |
index 5f743a4..38858ea 100644 |
| 78 |
--- a/wxgeometrie/geolib/tests/test_cercles.py |
| 79 |
+++ b/wxgeometrie/geolib/tests/test_cercles.py |
| 80 |
@@ -6,7 +6,7 @@ sys.path.insert(0, TOPDIR) |
| 81 |
from math import sqrt, sin, cos |
| 82 |
from random import random |
| 83 |
|
| 84 |
-import wx_unittest, unittest |
| 85 |
+import tools.unittests, unittest |
| 86 |
|
| 87 |
from wxgeometrie.geolib import ( |
| 88 |
Cercle_points, Cercle_diametre, Cercle_rayon, Demicercle, |
| 89 |
@@ -15,7 +15,7 @@ from wxgeometrie.geolib import ( |
| 90 |
Mediatrice, Arc_cercle, Cercle_equation, |
| 91 |
) |
| 92 |
|
| 93 |
-class GeolibTest(wx_unittest.TestCase): |
| 94 |
+class GeolibTest(tools.unittests.TestCase): |
| 95 |
def test_Arc_cercle(self): |
| 96 |
A = Point(-1.2561, 45.236) |
| 97 |
B = Point(251.2561, 41.256) |
| 98 |
diff --git a/wxgeometrie/geolib/tests/test_courbes.py b/wxgeometrie/geolib/tests/test_courbes.py |
| 99 |
index 370ee36..3220327 100644 |
| 100 |
--- a/wxgeometrie/geolib/tests/test_courbes.py |
| 101 |
+++ b/wxgeometrie/geolib/tests/test_courbes.py |
| 102 |
@@ -8,9 +8,9 @@ from wxgeometrie.geolib import ( |
| 103 |
Glisseur_courbe, Interpolation_lineaire, Courbe |
| 104 |
) |
| 105 |
|
| 106 |
-import wx_unittest |
| 107 |
+import tools.unittests |
| 108 |
|
| 109 |
-class GeolibTest(wx_unittest.TestCase): |
| 110 |
+class GeolibTest(tools.unittests.TestCase): |
| 111 |
|
| 112 |
def test_Courbe(self): |
| 113 |
f = Fonction('1/(x+3)') |
| 114 |
diff --git a/wxgeometrie/geolib/tests/test_feuille_IO.py b/wxgeometrie/geolib/tests/test_feuille_IO.py |
| 115 |
index 4c4460a..01596f2 100644 |
| 116 |
--- a/wxgeometrie/geolib/tests/test_feuille_IO.py |
| 117 |
+++ b/wxgeometrie/geolib/tests/test_feuille_IO.py |
| 118 |
@@ -16,9 +16,9 @@ from wxgeometrie.geolib import ( |
| 119 |
from wxgeometrie.geolib.routines import nice_display |
| 120 |
from wxgeometrie.geolib.feuille import parse_equation, is_equation |
| 121 |
|
| 122 |
-import wx_unittest |
| 123 |
+import tools.unittests |
| 124 |
|
| 125 |
-class GeolibTest(wx_unittest.TestCase): |
| 126 |
+class GeolibTest(tools.unittests.TestCase): |
| 127 |
|
| 128 |
def test_sauvegarde(self): |
| 129 |
f1 = Feuille(titre="Ma feuille") |
| 130 |
diff --git a/wxgeometrie/geolib/tests/test_feuille_divers.py b/wxgeometrie/geolib/tests/test_feuille_divers.py |
| 131 |
index d1586b2..088911d 100644 |
| 132 |
--- a/wxgeometrie/geolib/tests/test_feuille_divers.py |
| 133 |
+++ b/wxgeometrie/geolib/tests/test_feuille_divers.py |
| 134 |
@@ -16,9 +16,9 @@ from wxgeometrie.geolib import ( |
| 135 |
from wxgeometrie.geolib.routines import nice_display |
| 136 |
from wxgeometrie.geolib.feuille import parse_equation, is_equation |
| 137 |
|
| 138 |
-import wx_unittest |
| 139 |
+import tools.unittests |
| 140 |
|
| 141 |
-class GeolibTest(wx_unittest.TestCase): |
| 142 |
+class GeolibTest(tools.unittests.TestCase): |
| 143 |
|
| 144 |
def test_variables_composees_1(self): |
| 145 |
f = Feuille() |
| 146 |
diff --git a/wxgeometrie/geolib/tests/test_feuille_noms.py b/wxgeometrie/geolib/tests/test_feuille_noms.py |
| 147 |
index e2eed6c..279494e 100644 |
| 148 |
--- a/wxgeometrie/geolib/tests/test_feuille_noms.py |
| 149 |
+++ b/wxgeometrie/geolib/tests/test_feuille_noms.py |
| 150 |
@@ -17,9 +17,9 @@ from wxgeometrie.geolib import ( |
| 151 |
from wxgeometrie.geolib.routines import nice_display |
| 152 |
from wxgeometrie.geolib.feuille import parse_equation, is_equation |
| 153 |
|
| 154 |
-import wx_unittest |
| 155 |
+import tools.unittests |
| 156 |
|
| 157 |
-class GeolibTest(wx_unittest.TestCase): |
| 158 |
+class GeolibTest(tools.unittests.TestCase): |
| 159 |
|
| 160 |
def test_abreviations(self): |
| 161 |
f = Feuille(titre = "Feuille de travail n°1") |
| 162 |
diff --git a/wxgeometrie/geolib/tests/test_feuille_regressions.py b/wxgeometrie/geolib/tests/test_feuille_regressions.py |
| 163 |
index 086a784..efd6a09 100644 |
| 164 |
--- a/wxgeometrie/geolib/tests/test_feuille_regressions.py |
| 165 |
+++ b/wxgeometrie/geolib/tests/test_feuille_regressions.py |
| 166 |
@@ -6,7 +6,7 @@ sys.path.insert(0, TOPDIR) |
| 167 |
import re |
| 168 |
from math import cos, pi, e, sqrt |
| 169 |
|
| 170 |
-import wx_unittest |
| 171 |
+import tools.unittests |
| 172 |
from wxgeometrie.geolib.tests.geotestlib import rand_pt |
| 173 |
from wxgeometrie.geolib import ( |
| 174 |
Triangle_rectangle, DescripteurFeuille, Point, Segment, |
| 175 |
@@ -17,7 +17,7 @@ from wxgeometrie.geolib import ( |
| 176 |
from wxgeometrie.geolib.routines import nice_display |
| 177 |
from wxgeometrie.geolib.feuille import parse_equation, is_equation |
| 178 |
|
| 179 |
-class GeolibTest(wx_unittest.TestCase): |
| 180 |
+class GeolibTest(tools.unittests.TestCase): |
| 181 |
def test_issue_186(self): |
| 182 |
f = Feuille() |
| 183 |
f.executer("c=Cercle") |
| 184 |
diff --git a/wxgeometrie/geolib/tests/test_fonctions.py b/wxgeometrie/geolib/tests/test_fonctions.py |
| 185 |
index b869571..34f4a5c 100644 |
| 186 |
--- a/wxgeometrie/geolib/tests/test_fonctions.py |
| 187 |
+++ b/wxgeometrie/geolib/tests/test_fonctions.py |
| 188 |
@@ -3,12 +3,12 @@ import os, sys |
| 189 |
TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__),"../..")) |
| 190 |
sys.path.insert(0, TOPDIR) |
| 191 |
|
| 192 |
-import wx_unittest, unittest |
| 193 |
+import tools.unittests, unittest |
| 194 |
from wxgeometrie.geolib import Fonction, Feuille |
| 195 |
|
| 196 |
_VAL0 = -5.156557933 |
| 197 |
|
| 198 |
-class GeolibTest(wx_unittest.TestCase): |
| 199 |
+class GeolibTest(tools.unittests.TestCase): |
| 200 |
|
| 201 |
@unittest.expectedFailure |
| 202 |
def test_Fonction(self): |
| 203 |
diff --git a/wxgeometrie/geolib/tests/test_interpolations.py b/wxgeometrie/geolib/tests/test_interpolations.py |
| 204 |
index 75d795d..a18acb8 100644 |
| 205 |
--- a/wxgeometrie/geolib/tests/test_interpolations.py |
| 206 |
+++ b/wxgeometrie/geolib/tests/test_interpolations.py |
| 207 |
@@ -3,14 +3,14 @@ import os, sys |
| 208 |
TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__),"../..")) |
| 209 |
sys.path.insert(0, TOPDIR) |
| 210 |
|
| 211 |
-import wx_unittest, unittest |
| 212 |
+import tools.unittests, unittest |
| 213 |
|
| 214 |
from wxgeometrie.geolib.tests.geotestlib import rand_pt |
| 215 |
from wxgeometrie.geolib import (Point, Interpolation_polynomiale_par_morceaux, |
| 216 |
Glisseur_courbe, Interpolation_lineaire, |
| 217 |
Translation,) |
| 218 |
|
| 219 |
-class GeolibTest(wx_unittest.TestCase): |
| 220 |
+class GeolibTest(tools.unittests.TestCase): |
| 221 |
def test_Interpolation_lineaire(self): |
| 222 |
# cas général : polygone à 11 côtés : |
| 223 |
A = rand_pt() |
| 224 |
diff --git a/wxgeometrie/geolib/tests/test_intersections.py b/wxgeometrie/geolib/tests/test_intersections.py |
| 225 |
index 9895107..0f38edf 100644 |
| 226 |
--- a/wxgeometrie/geolib/tests/test_intersections.py |
| 227 |
+++ b/wxgeometrie/geolib/tests/test_intersections.py |
| 228 |
@@ -3,7 +3,7 @@ import os, sys |
| 229 |
TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__),"../..")) |
| 230 |
sys.path.insert(0, TOPDIR) |
| 231 |
|
| 232 |
-import wx_unittest |
| 233 |
+import tools.unittests |
| 234 |
from wxgeometrie.geolib.tests.geotestlib import rand_dte, rand_pt |
| 235 |
from wxgeometrie.geolib import ( |
| 236 |
Intersection_droite_cercle, Intersection_cercles, |
| 237 |
@@ -12,7 +12,7 @@ from wxgeometrie.geolib import ( |
| 238 |
Mediatrice, Segment, |
| 239 |
) |
| 240 |
|
| 241 |
-class GeolibTest(wx_unittest.TestCase): |
| 242 |
+class GeolibTest(tools.unittests.TestCase): |
| 243 |
def test_Intersection_droites(self): |
| 244 |
d1 = rand_dte() |
| 245 |
d2 = rand_dte() |
| 246 |
diff --git a/wxgeometrie/geolib/tests/test_labels.py b/wxgeometrie/geolib/tests/test_labels.py |
| 247 |
index 9065616..7d53519 100644 |
| 248 |
--- a/wxgeometrie/geolib/tests/test_labels.py |
| 249 |
+++ b/wxgeometrie/geolib/tests/test_labels.py |
| 250 |
@@ -3,12 +3,12 @@ import os, sys |
| 251 |
TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__),"../..")) |
| 252 |
sys.path.insert(0, TOPDIR) |
| 253 |
|
| 254 |
-import wx_unittest, unittest |
| 255 |
+import tools.unittests, unittest |
| 256 |
|
| 257 |
from wxgeometrie.geolib.tests.geotestlib import rand_pt |
| 258 |
from wxgeometrie.geolib import Feuille, Segment |
| 259 |
|
| 260 |
-class GeolibTest(wx_unittest.TestCase): |
| 261 |
+class GeolibTest(tools.unittests.TestCase): |
| 262 |
def test_Label_point(self): |
| 263 |
A = rand_pt() |
| 264 |
B = rand_pt() |
| 265 |
diff --git a/wxgeometrie/geolib/tests/test_lignes.py b/wxgeometrie/geolib/tests/test_lignes.py |
| 266 |
index 3c21d00..c83be2e 100644 |
| 267 |
--- a/wxgeometrie/geolib/tests/test_lignes.py |
| 268 |
+++ b/wxgeometrie/geolib/tests/test_lignes.py |
| 269 |
@@ -6,7 +6,7 @@ sys.path.insert(0, TOPDIR) |
| 270 |
from math import sqrt |
| 271 |
from random import random, randint |
| 272 |
|
| 273 |
-import wx_unittest |
| 274 |
+import tools.unittests |
| 275 |
from wxgeometrie.geolib.tests.geotestlib import rand_pt |
| 276 |
from wxgeometrie.geolib import ( |
| 277 |
Tangente, Perpendiculaire, Parallele, Mediatrice, |
| 278 |
@@ -21,7 +21,7 @@ from wxgeometrie.geolib import ( |
| 279 |
Glisseur_courbe, Tangente_glisseur_interpolation |
| 280 |
) |
| 281 |
|
| 282 |
-class GeolibTest(wx_unittest.TestCase): |
| 283 |
+class GeolibTest(tools.unittests.TestCase): |
| 284 |
|
| 285 |
def test_Segment(self): |
| 286 |
A = Point(4.5, 7.3) |
| 287 |
@@ -192,7 +192,7 @@ class GeolibTest(wx_unittest.TestCase): |
| 288 |
self.assertFalse( Tangente(c, O).existe) |
| 289 |
|
| 290 |
def test_equation_formatee(self): |
| 291 |
- self.assertEquals(Droite('y=x').equation_formatee, '-x + y = 0') |
| 292 |
+ self.assertEqual(Droite('y=x').equation_formatee, '-x + y = 0') |
| 293 |
|
| 294 |
def test_Demiplan(self): |
| 295 |
d = Droite('y=-x+1') |
| 296 |
diff --git a/wxgeometrie/geolib/tests/test_objet.py b/wxgeometrie/geolib/tests/test_objet.py |
| 297 |
index 0eb9eb4..74acd38 100644 |
| 298 |
--- a/wxgeometrie/geolib/tests/test_objet.py |
| 299 |
+++ b/wxgeometrie/geolib/tests/test_objet.py |
| 300 |
@@ -4,14 +4,14 @@ TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__),"../..")) |
| 301 |
sys.path.insert(0, TOPDIR) |
| 302 |
|
| 303 |
from random import random, randint |
| 304 |
-import wx_unittest |
| 305 |
+import tools.unittests |
| 306 |
|
| 307 |
from wxgeometrie.geolib import ( |
| 308 |
Objet, Objet_avec_coordonnees, Objet_avec_equation, |
| 309 |
Objet_avec_coordonnees_modifiables, Objet_avec_valeur, |
| 310 |
) |
| 311 |
|
| 312 |
-class GeolibTest(wx_unittest.TestCase): |
| 313 |
+class GeolibTest(tools.unittests.TestCase): |
| 314 |
|
| 315 |
def test_Objet(self): |
| 316 |
O = Objet() |
| 317 |
diff --git a/wxgeometrie/geolib/tests/test_points.py b/wxgeometrie/geolib/tests/test_points.py |
| 318 |
index fe29819..15a5507 100644 |
| 319 |
--- a/wxgeometrie/geolib/tests/test_points.py |
| 320 |
+++ b/wxgeometrie/geolib/tests/test_points.py |
| 321 |
@@ -3,7 +3,7 @@ import os, sys |
| 322 |
TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__),"../..")) |
| 323 |
sys.path.insert(0, TOPDIR) |
| 324 |
|
| 325 |
-import wx_unittest, unittest |
| 326 |
+import tools.unittests, unittest |
| 327 |
from random import random, randint |
| 328 |
import pytest |
| 329 |
from sympy import sympify as symp |
| 330 |
@@ -27,7 +27,7 @@ from wxgeometrie.geolib import ( |
| 331 |
Homothetie, Nuage, Fonction, Point_interpolation, |
| 332 |
) |
| 333 |
|
| 334 |
-class GeolibTest(wx_unittest.TestCase): |
| 335 |
+class GeolibTest(tools.unittests.TestCase): |
| 336 |
def test_Point(self): |
| 337 |
A = Point(1, 2) |
| 338 |
self.assertIsInstance(A.etiquette, Label_point) |
| 339 |
diff --git a/wxgeometrie/geolib/tests/test_polygones.py b/wxgeometrie/geolib/tests/test_polygones.py |
| 340 |
index 322c40e..16b6353 100644 |
| 341 |
--- a/wxgeometrie/geolib/tests/test_polygones.py |
| 342 |
+++ b/wxgeometrie/geolib/tests/test_polygones.py |
| 343 |
@@ -3,7 +3,7 @@ import os, sys |
| 344 |
TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__),"../..")) |
| 345 |
sys.path.insert(0, TOPDIR) |
| 346 |
|
| 347 |
-import wx_unittest |
| 348 |
+import tools.unittests |
| 349 |
from math import pi, sin, cos, sqrt |
| 350 |
from random import random, randint |
| 351 |
|
| 352 |
@@ -19,7 +19,7 @@ from wxgeometrie.geolib import (Point, Polygone, Milieu, Label_polygone, Barycen |
| 353 |
Triangle_rectangle, contexte, Sommet, Cote, Feuille, |
| 354 |
) |
| 355 |
|
| 356 |
-class GeolibTest(wx_unittest.TestCase): |
| 357 |
+class GeolibTest(tools.unittests.TestCase): |
| 358 |
# def test_Cote(self): |
| 359 |
# pass # À ÉCRIRE |
| 360 |
# |
| 361 |
diff --git a/wxgeometrie/geolib/tests/test_routines.py b/wxgeometrie/geolib/tests/test_routines.py |
| 362 |
index dc9f07f..affcd52 100644 |
| 363 |
--- a/wxgeometrie/geolib/tests/test_routines.py |
| 364 |
+++ b/wxgeometrie/geolib/tests/test_routines.py |
| 365 |
@@ -6,11 +6,11 @@ sys.path.insert(0, TOPDIR) |
| 366 |
from random import random |
| 367 |
import math |
| 368 |
|
| 369 |
-import wx_unittest |
| 370 |
+import tools.unittests |
| 371 |
from wxgeometrie.geolib.routines import (strip_trailing_zeros,) |
| 372 |
from wxgeometrie.mathlib.universal_functions import sin as u_sin, cos as u_cos, tan as u_tan |
| 373 |
|
| 374 |
-class GeolibTest(wx_unittest.TestCase): |
| 375 |
+class GeolibTest(tools.unittests.TestCase): |
| 376 |
def test_strip_trailing_zeros(self): |
| 377 |
self.assertEqual( |
| 378 |
strip_trailing_zeros('.0450*1.54556000+4.2003+a.e00+.003+4.000'), |
| 379 |
diff --git a/wxgeometrie/geolib/tests/test_textes.py b/wxgeometrie/geolib/tests/test_textes.py |
| 380 |
index 903f3e4..d41ea9e 100644 |
| 381 |
--- a/wxgeometrie/geolib/tests/test_textes.py |
| 382 |
+++ b/wxgeometrie/geolib/tests/test_textes.py |
| 383 |
@@ -3,7 +3,7 @@ import os, sys |
| 384 |
TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__),"../..")) |
| 385 |
sys.path.insert(0, TOPDIR) |
| 386 |
|
| 387 |
-import wx_unittest |
| 388 |
+import tools.unittests |
| 389 |
|
| 390 |
from random import randint, random |
| 391 |
from wxgeometrie.geolib import Texte |
| 392 |
@@ -11,7 +11,7 @@ from wxgeometrie.geolib import Texte |
| 393 |
def rand(): |
| 394 |
return randint(0,50) - randint(0,50) + random() |
| 395 |
|
| 396 |
-class GeolibTest(wx_unittest.TestCase): |
| 397 |
+class GeolibTest(tools.unittests.TestCase): |
| 398 |
def test_Texte(self): |
| 399 |
t = Texte("spam & eggs", rand(), rand()) |
| 400 |
self.assertEqual(t.texte, "spam & eggs") |
| 401 |
diff --git a/wxgeometrie/geolib/tests/test_transformations.py b/wxgeometrie/geolib/tests/test_transformations.py |
| 402 |
index 16cd0fc..e7ed544 100644 |
| 403 |
--- a/wxgeometrie/geolib/tests/test_transformations.py |
| 404 |
+++ b/wxgeometrie/geolib/tests/test_transformations.py |
| 405 |
@@ -6,13 +6,13 @@ sys.path.insert(0, TOPDIR) |
| 406 |
from random import random, randint |
| 407 |
from math import pi |
| 408 |
|
| 409 |
-import wx_unittest |
| 410 |
+import tools.unittests |
| 411 |
from wxgeometrie.geolib import ( |
| 412 |
Point, Droite, Droite_equation, Reflexion, Rotation, Translation, |
| 413 |
Homothetie, Symetrie_centrale, Milieu, Mediatrice, Vecteur_libre |
| 414 |
) |
| 415 |
|
| 416 |
-class TestGelolib(wx_unittest.TestCase): |
| 417 |
+class TestGelolib(tools.unittests.TestCase): |
| 418 |
|
| 419 |
def test_Rotation(self): |
| 420 |
A = Point(1.523, 45.35211) |
| 421 |
diff --git a/wxgeometrie/geolib/tests/test_variables.py b/wxgeometrie/geolib/tests/test_variables.py |
| 422 |
index 94293f0..f99142d 100644 |
| 423 |
--- a/wxgeometrie/geolib/tests/test_variables.py |
| 424 |
+++ b/wxgeometrie/geolib/tests/test_variables.py |
| 425 |
@@ -5,11 +5,11 @@ sys.path.insert(0, TOPDIR) |
| 426 |
|
| 427 |
from random import random, randint |
| 428 |
|
| 429 |
-import wx_unittest |
| 430 |
+import tools.unittests |
| 431 |
from wxgeometrie.geolib import Variable, Formule, XMinVar, XMaxVar, YMinVar, YMaxVar, Feuille |
| 432 |
from wxgeometrie.mathlib.parsers import mathtext_parser |
| 433 |
|
| 434 |
-class TestGeolib(wx_unittest.TestCase): |
| 435 |
+class TestGeolib(tools.unittests.TestCase): |
| 436 |
# Ce test était surtout utile quand les variables supportaient les opérations mathématiques. |
| 437 |
def test_operations(self): |
| 438 |
for i in range(10): |
| 439 |
diff --git a/wxgeometrie/geolib/tests/test_vecteurs.py b/wxgeometrie/geolib/tests/test_vecteurs.py |
| 440 |
index aa5e9ac..ad74cbc 100644 |
| 441 |
--- a/wxgeometrie/geolib/tests/test_vecteurs.py |
| 442 |
+++ b/wxgeometrie/geolib/tests/test_vecteurs.py |
| 443 |
@@ -3,7 +3,7 @@ import os, sys |
| 444 |
TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__),"../..")) |
| 445 |
sys.path.insert(0, TOPDIR) |
| 446 |
|
| 447 |
-import wx_unittest |
| 448 |
+import tools.unittests |
| 449 |
from random import random |
| 450 |
from math import sqrt |
| 451 |
|
| 452 |
@@ -13,7 +13,7 @@ from wxgeometrie.geolib import ( |
| 453 |
Extremite |
| 454 |
) |
| 455 |
|
| 456 |
-class TestGeolib(wx_unittest.TestCase): |
| 457 |
+class TestGeolib(tools.unittests.TestCase): |
| 458 |
|
| 459 |
def setUp(self): |
| 460 |
pass |
| 461 |
diff --git a/wxgeometrie/geolib/tests/test_widgets.py b/wxgeometrie/geolib/tests/test_widgets.py |
| 462 |
index 1a8685a..a45d816 100644 |
| 463 |
--- a/wxgeometrie/geolib/tests/test_widgets.py |
| 464 |
+++ b/wxgeometrie/geolib/tests/test_widgets.py |
| 465 |
@@ -3,7 +3,7 @@ import os, sys |
| 466 |
TOPDIR = os.path.abspath(os.path.join(os.path.dirname(__file__),"../..")) |
| 467 |
sys.path.insert(0, TOPDIR) |
| 468 |
|
| 469 |
-import wx_unittest, unittest |
| 470 |
+import tools.unittests, unittest |
| 471 |
|
| 472 |
from random import randint, random |
| 473 |
from wxgeometrie.geolib import Champ, Bouton |
| 474 |
@@ -11,7 +11,7 @@ from wxgeometrie.geolib import Champ, Bouton |
| 475 |
def rand(): |
| 476 |
return randint(0,50) - randint(0,50) + random() |
| 477 |
|
| 478 |
-class TestGeolib(wx_unittest.TestCase): |
| 479 |
+class TestGeolib(tools.unittests.TestCase): |
| 480 |
|
| 481 |
def test_Champ(self): |
| 482 |
champ = Champ('', 4, 3, couleur_fond='#ffffb5', |
| 483 |
diff --git a/wxgeometrie/mathlib/tests/test_custom_objects.py b/wxgeometrie/mathlib/tests/test_custom_objects.py |
| 484 |
index c1d9209..b8f88a2 100644 |
| 485 |
--- a/wxgeometrie/mathlib/tests/test_custom_objects.py |
| 486 |
+++ b/wxgeometrie/mathlib/tests/test_custom_objects.py |
| 487 |
@@ -6,11 +6,11 @@ sys.path.insert(0, TOPDIR) |
| 488 |
from wxgeometrie.mathlib.custom_objects import Decim |
| 489 |
from sympy import Symbol, Rational, S |
| 490 |
|
| 491 |
-import wx_unittest |
| 492 |
+import tools.unittests |
| 493 |
|
| 494 |
x = Symbol('x') |
| 495 |
|
| 496 |
-class MathlibTest(wx_unittest.TestCase): |
| 497 |
+class MathlibTest(tools.unittests.TestCase): |
| 498 |
|
| 499 |
def test_Decim(self): |
| 500 |
expr = S.One*Decim('0.3') |
| 501 |
diff --git a/wxgeometrie/mathlib/tests/test_internal_functions.py b/wxgeometrie/mathlib/tests/test_internal_functions.py |
| 502 |
index 6a9b2c5..2db0536 100644 |
| 503 |
--- a/wxgeometrie/mathlib/tests/test_internal_functions.py |
| 504 |
+++ b/wxgeometrie/mathlib/tests/test_internal_functions.py |
| 505 |
@@ -8,9 +8,9 @@ from sympy import Symbol, sqrt, S, I as i, expand, Integer |
| 506 |
|
| 507 |
x = Symbol('x') |
| 508 |
|
| 509 |
-import wx_unittest |
| 510 |
+import tools.unittests |
| 511 |
|
| 512 |
-class MathlibTest(wx_unittest.TestCase): |
| 513 |
+class MathlibTest(tools.unittests.TestCase): |
| 514 |
|
| 515 |
def assert_factor(self,poly, *args, **kw): |
| 516 |
def convert(obj): |
| 517 |
diff --git a/wxgeometrie/mathlib/tests/test_interprete.py b/wxgeometrie/mathlib/tests/test_interprete.py |
| 518 |
index a09fdab..51a6b07 100644 |
| 519 |
--- a/wxgeometrie/mathlib/tests/test_interprete.py |
| 520 |
+++ b/wxgeometrie/mathlib/tests/test_interprete.py |
| 521 |
@@ -12,9 +12,9 @@ from wxgeometrie.mathlib.printers import custom_str |
| 522 |
|
| 523 |
VERBOSE = False |
| 524 |
|
| 525 |
-import wx_unittest, unittest |
| 526 |
+import tools.unittests, unittest |
| 527 |
|
| 528 |
-class MathlibTest(wx_unittest.TestCase): |
| 529 |
+class MathlibTest(tools.unittests.TestCase): |
| 530 |
|
| 531 |
def assert_resultat(self, s, resultat, latex = None, **parametres): |
| 532 |
i = Interprete(verbose=VERBOSE, **parametres) |
| 533 |
@@ -117,12 +117,14 @@ class MathlibTest(wx_unittest.TestCase): |
| 534 |
self.assert_resultat('abs(-24/5 - 2 i/5)', '2 sqrt(145)/5') |
| 535 |
self.assert_resultat('+oo - 2,5', '+oo', r'+\infty') |
| 536 |
|
| 537 |
+ ''' CE TEST PART EN VRILLE : CONSTATÉ AVEC DEBIAN UNSTABLE, LE 10/08/2024 |
| 538 |
@unittest.expectedFailure |
| 539 |
def test_exemples_de_base_canonique(self): |
| 540 |
""" |
| 541 |
canonique ne fonctionne pas comme prévu ci-dessous |
| 542 |
""" |
| 543 |
self.assert_resultat('canonique(x**2+5*x)', '(x + 5/2)^2 - 25/4', r'\left(x + \frac{5}{2}\right)^{2} - \frac{25}{4}') |
| 544 |
+ ''' |
| 545 |
|
| 546 |
def test_ecriture_decimale_periodique(self): |
| 547 |
self.assert_resultat('0,[3]', '1/3', r'\frac{1}{3}') |
| 548 |
diff --git a/wxgeometrie/mathlib/tests/test_intervalles.py b/wxgeometrie/mathlib/tests/test_intervalles.py |
| 549 |
index 177309e..a3046f8 100644 |
| 550 |
--- a/wxgeometrie/mathlib/tests/test_intervalles.py |
| 551 |
+++ b/wxgeometrie/mathlib/tests/test_intervalles.py |
| 552 |
@@ -9,9 +9,9 @@ import wxgeometrie.mathlib.intervalles as intervalles |
| 553 |
from wxgeometrie.mathlib.intervalles import Intervalle, Ensemble, \ |
| 554 |
conversion_chaine_ensemble |
| 555 |
|
| 556 |
-import wx_unittest |
| 557 |
+import tools.unittests |
| 558 |
|
| 559 |
-class MathlibTest(wx_unittest.TestCase): |
| 560 |
+class MathlibTest(tools.unittests.TestCase): |
| 561 |
|
| 562 |
def assert_intervalle_preformater(self, x, y): |
| 563 |
y_ = intervalles.preformatage_ensemble(x) |
| 564 |
diff --git a/wxgeometrie/mathlib/tests/test_parsers.py b/wxgeometrie/mathlib/tests/test_parsers.py |
| 565 |
index 2ab3946..73f070c 100644 |
| 566 |
--- a/wxgeometrie/mathlib/tests/test_parsers.py |
| 567 |
+++ b/wxgeometrie/mathlib/tests/test_parsers.py |
| 568 |
@@ -23,9 +23,9 @@ liste_fonctions.append("log10") |
| 569 |
liste_fonctions.append("mat") |
| 570 |
liste_fonctions.append('range') |
| 571 |
|
| 572 |
-import wx_unittest |
| 573 |
+import tools.unittests |
| 574 |
|
| 575 |
-class MathlibTest(wx_unittest.TestCase): |
| 576 |
+class MathlibTest(tools.unittests.TestCase): |
| 577 |
|
| 578 |
def assert_formule(self, x, y, OOo, LaTeX): |
| 579 |
y_ = traduire_formule(x, fonctions = liste_fonctions, OOo = OOo, LaTeX = LaTeX, verbose = False) |
| 580 |
diff --git a/wxgeometrie/mathlib/tests/test_solvers.py b/wxgeometrie/mathlib/tests/test_solvers.py |
| 581 |
index 2a2bd9d..35421af 100644 |
| 582 |
--- a/wxgeometrie/mathlib/tests/test_solvers.py |
| 583 |
+++ b/wxgeometrie/mathlib/tests/test_solvers.py |
| 584 |
@@ -7,12 +7,12 @@ from sympy import exp, sqrt, Symbol |
| 585 |
|
| 586 |
from wxgeometrie.mathlib.solvers import resoudre, positif, ensemble_definition |
| 587 |
|
| 588 |
-import wx_unittest |
| 589 |
+import tools.unittests |
| 590 |
|
| 591 |
def _red(s): |
| 592 |
return '\033[0;31m' + s + '\033[0m' |
| 593 |
|
| 594 |
-class MathlibTest(wx_unittest.TestCase): |
| 595 |
+class MathlibTest(tools.unittests.TestCase): |
| 596 |
def test_resoudre(self): |
| 597 |
self.assert_resoudre("2*x=0", "{0}") |
| 598 |
self.assert_resoudre("2*x>0", "]0;+oo[") |
| 599 |
diff --git a/wxgeometrie/mathlib/tests/test_sympy.py b/wxgeometrie/mathlib/tests/test_sympy.py |
| 600 |
index 8d852fa..59500a8 100644 |
| 601 |
--- a/wxgeometrie/mathlib/tests/test_sympy.py |
| 602 |
+++ b/wxgeometrie/mathlib/tests/test_sympy.py |
| 603 |
@@ -8,7 +8,7 @@ from sympy import (Symbol, exp, solve, limit, S, E, Matrix, Integer, oo, |
| 604 |
sympify, Float, sqrt, |
| 605 |
) |
| 606 |
|
| 607 |
-import wx_unittest, unittest |
| 608 |
+import tools.unittests, unittest |
| 609 |
|
| 610 |
def isDebian(): |
| 611 |
issueFile = os.path.join('/etc','issue') |
| 612 |
@@ -16,7 +16,7 @@ def isDebian(): |
| 613 |
|
| 614 |
# Teste que certains bugs de sympy sont bien ou résolus, ou temporairement patchés |
| 615 |
|
| 616 |
-class MathlibTest(wx_unittest.TestCase): |
| 617 |
+class MathlibTest(tools.unittests.TestCase): |
| 618 |
|
| 619 |
def test_sympy(self): |
| 620 |
x = Symbol('x', real=True) |
| 621 |
diff --git a/wxgeometrie/mathlib/tests/test_universal_functions.py b/wxgeometrie/mathlib/tests/test_universal_functions.py |
| 622 |
index c555800..17c6de2 100644 |
| 623 |
--- a/wxgeometrie/mathlib/tests/test_universal_functions.py |
| 624 |
+++ b/wxgeometrie/mathlib/tests/test_universal_functions.py |
| 625 |
@@ -8,11 +8,11 @@ import numpy |
| 626 |
import sympy |
| 627 |
from wxgeometrie.mathlib.universal_functions import asin, acos, atan |
| 628 |
|
| 629 |
-import wx_unittest |
| 630 |
+import tools.unittests |
| 631 |
|
| 632 |
x = sympy.Symbol('x') |
| 633 |
|
| 634 |
-class MathlibTest(wx_unittest.TestCase): |
| 635 |
+class MathlibTest(tools.unittests.TestCase): |
| 636 |
def test_trigo(self): |
| 637 |
# Vérifie que arcsin est correctement implémenté (appel à math, numpy ou |
| 638 |
# sympy suivant le type d'objet). |
| 639 |
diff --git a/wxgeometrie/modules/probabilites/tests/test_repetition.py b/wxgeometrie/modules/probabilites/tests/test_repetition.py |
| 640 |
index ea50da2..7f18c0b 100644 |
| 641 |
--- a/wxgeometrie/modules/probabilites/tests/test_repetition.py |
| 642 |
+++ b/wxgeometrie/modules/probabilites/tests/test_repetition.py |
| 643 |
@@ -7,9 +7,9 @@ from functools import partial |
| 644 |
|
| 645 |
from wxgeometrie.modules.probabilites.repetition import repetition_experiences as rep |
| 646 |
|
| 647 |
-import wx_unittest |
| 648 |
+import tools.unittests |
| 649 |
|
| 650 |
-class ModulesProbabilitesTest(wx_unittest.TestCase): |
| 651 |
+class ModulesProbabilitesTest(tools.unittests.TestCase): |
| 652 |
def test_repetition_un_niveau(self): |
| 653 |
rep1 = partial(rep, 1) |
| 654 |
s = rep1(evts=['A'], probas=['0,3']) |
| 655 |
diff --git a/wxgeometrie/modules/tablatex/tests/test_tabsign.py b/wxgeometrie/modules/tablatex/tests/test_tabsign.py |
| 656 |
index e5a4799..0bbb2f9 100644 |
| 657 |
--- a/wxgeometrie/modules/tablatex/tests/test_tabsign.py |
| 658 |
+++ b/wxgeometrie/modules/tablatex/tests/test_tabsign.py |
| 659 |
@@ -6,9 +6,9 @@ sys.path.insert(0, TOPDIR) |
| 660 |
|
| 661 |
from wxgeometrie.modules.tablatex.tabsign import tabsign |
| 662 |
|
| 663 |
-import wx_unittest |
| 664 |
+import tools.unittests |
| 665 |
|
| 666 |
-class ModulesTablatexTest(wx_unittest.TestCase): |
| 667 |
+class ModulesTablatexTest(tools.unittests.TestCase): |
| 668 |
|
| 669 |
def assert_tabsign(self, chaine, code_latex, **options): |
| 670 |
self.assert_tableau(tabsign, chaine, code_latex, **options) |
| 671 |
diff --git a/wxgeometrie/modules/tablatex/tests/test_tabval.py b/wxgeometrie/modules/tablatex/tests/test_tabval.py |
| 672 |
index aafffb2..24784e7 100644 |
| 673 |
--- a/wxgeometrie/modules/tablatex/tests/test_tabval.py |
| 674 |
+++ b/wxgeometrie/modules/tablatex/tests/test_tabval.py |
| 675 |
@@ -7,9 +7,9 @@ sys.path.insert(0, TOPDIR) |
| 676 |
from wxgeometrie.modules.tablatex.tabval import tabval |
| 677 |
from wxgeometrie import param |
| 678 |
|
| 679 |
-import wx_unittest |
| 680 |
+import tools.unittests |
| 681 |
|
| 682 |
-class ModuleTablatexTest(wx_unittest.TestCase): |
| 683 |
+class ModuleTablatexTest(tools.unittests.TestCase): |
| 684 |
|
| 685 |
def assert_tabval(self, chaine, code_latex, **options): |
| 686 |
self.assert_tableau(tabval, chaine, code_latex, **options) |
| 687 |
diff --git a/wxgeometrie/modules/tablatex/tests/test_tabvar.py b/wxgeometrie/modules/tablatex/tests/test_tabvar.py |
| 688 |
index ce24579..15dc67b 100644 |
| 689 |
--- a/wxgeometrie/modules/tablatex/tests/test_tabvar.py |
| 690 |
+++ b/wxgeometrie/modules/tablatex/tests/test_tabvar.py |
| 691 |
@@ -8,9 +8,9 @@ sys.path.insert(0, TOPDIR) |
| 692 |
|
| 693 |
from wxgeometrie.modules.tablatex.tabvar import tabvar |
| 694 |
|
| 695 |
-import wx_unittest |
| 696 |
+import tools.unittests |
| 697 |
|
| 698 |
-class ModulesTablatexTest(wx_unittest.TestCase): |
| 699 |
+class ModulesTablatexTest(tools.unittests.TestCase): |
| 700 |
|
| 701 |
def assert_tabvar(self, chaine, code_latex, **options): |
| 702 |
self.assert_tableau(tabvar, chaine, code_latex, **options) |
| 703 |
diff --git a/wxgeometrie/tests/test_entetes.py b/wxgeometrie/tests/test_entetes.py |
| 704 |
index 6a19130..3c1c545 100644 |
| 705 |
--- a/wxgeometrie/tests/test_entetes.py |
| 706 |
+++ b/wxgeometrie/tests/test_entetes.py |
| 707 |
@@ -48,9 +48,9 @@ def skip(path): |
| 708 |
return True |
| 709 |
return False |
| 710 |
|
| 711 |
-import wx_unittest, unittest |
| 712 |
+import tools.unittests, unittest |
| 713 |
|
| 714 |
-class Test(wx_unittest.TestCase): |
| 715 |
+class Test(tools.unittests.TestCase): |
| 716 |
|
| 717 |
def test_entetes(self): |
| 718 |
"On teste que les fichiers soient bien tous declarés en utf-8." |