Skip to content

Commit b045101

Browse files
committed
fix unit test
1 parent 8e51ef7 commit b045101

File tree

7 files changed

+5
-13
lines changed

7 files changed

+5
-13
lines changed

README.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
:target: https://ci.appveyor.com/project/sdpython/teachpyx
44
:alt: Build Status Windows
55

6-
.. image:: https://dl.circleci.com/status-badge/img/gh/sdpython/teachpyx/tree/main.svg?style=svg
7-
:target: https://dl.circleci.com/status-badge/redirect/gh/sdpython/teachpyx/tree/main
8-
96
.. image:: https://badge.fury.io/py/teachpyx.svg
107
:target: https://pypi.org/project/teachpyx/
118

_doc/articles/2025/2025-11-31-route2025.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _l-feuille-route-ensae-2025:
22

3-
2025-11-31 : rappel feuille de route 2024
3+
2025-11-31 : rappel feuille de route 2025
44
=========================================
55

66
Le plan des séances est parfois changé après que celles-ci ont eu lieu.

_doc/index.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ Le contenu est sur `github <https://github.com/sdpython/teachpyx/>`_.
5757
:target: https://ci.appveyor.com/project/sdpython/teachpyx
5858
:alt: Build Status Windows
5959

60-
.. image:: https://dl.circleci.com/status-badge/img/gh/sdpython/teachpyx/tree/main.svg?style=svg
61-
:target: https://dl.circleci.com/status-badge/redirect/gh/sdpython/teachpyx/tree/main
62-
6360
.. image:: https://badge.fury.io/py/teachpyx.svg
6461
:target: https://pypi.org/project/teachpyx/
6562

_unittests/ut_examples/test_numpysex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def test_numpys(self):
1212

1313
def test_numpys_types(self):
1414
dt = numpy_types()
15-
self.assertEqual(len(dt), 19)
15+
self.assertEqual(len(dt), 17)
1616

1717

1818
if __name__ == "__main__":

_unittests/ut_faq/test_faq_numpy.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ class TestFaqNumpy(unittest.TestCase):
77
def test_missing(self):
88
pi = math.pi
99
fpi = to_float32(pi)
10-
if fpi == pi:
11-
raise AssertionError(f"not possible {pi} ? {fpi}")
10+
assert abs(fpi - pi) < 1e-7, f"not possible {pi} ? {fpi}"
1211

1312

1413
if __name__ == "__main__":

teachpyx/examples/numpysex.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,9 @@ def numpy_types():
9090
numpy.uint16,
9191
numpy.uint32,
9292
numpy.uint64,
93-
numpy.float_,
9493
numpy.float16,
9594
numpy.float32,
9695
numpy.float64,
97-
numpy.complex_,
9896
numpy.complex64,
9997
numpy.complex128,
10098
]

teachpyx/tools/profiling.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,8 @@ def add_rows(rows, d):
438438
stall = 0
439439
if verbose and logf is not None:
440440
logf(
441-
"[pstats] %s=%r" % (clean_text(k[0].replace("\\", "/")), *k[1:], v)
441+
"[pstats] %s=%r"
442+
% (clean_text(k[0].replace("\\", "/")), (*k[1:], v))
442443
)
443444
if len(v) < 5:
444445
continue

0 commit comments

Comments
 (0)