Skip to content

Commit 7c647b0

Browse files
authored
Merge pull request #9 from Johnny-Wish/fix-test-logging
Fix test logging
2 parents a70060d + d9d3495 commit 7c647b0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_function_basis.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def test_legendre_polynomials():
2626
p2 = LegendrePolynomial(d)(x2)
2727
assert p2.requires_grad, f"output seems detached from the graph"
2828
p2 = p2.detach().cpu().numpy()
29-
assert isclose(p2, p1).all(), f"p1 = {p1}, p2 = {p2}, delta = {p1 - p2}, max_delta = {abs(np.max(p1 - p2))}"
29+
assert isclose(p2, p1).all(), f"p1 = {p1}, p2 = {p2}, delta = {p1 - p2}, max_delta = {np.max(abs(p1 - p2))}"
3030

3131

3232
def test_legendre_basis():
@@ -42,7 +42,7 @@ def test_legendre_basis():
4242
assert y2.requires_grad, f"output seems detached from the graph"
4343

4444
y2 = y2.detach().cpu().numpy()
45-
assert isclose(y2, y1).all(), f"y1 = {y1}, y2 = {y2}, delta = {y1 - y2}, max_delta = {abs(np.max(y1 - y2))}"
45+
assert isclose(y2, y1).all(), f"y1 = {y1}, y2 = {y2}, delta = {y1 - y2}, max_delta = {np.max(abs(y1 - y2))}"
4646

4747

4848
def test_zero_order_spherical_harmonics():
@@ -66,7 +66,7 @@ def test_zero_order_spherical_harmonics():
6666
assert y2.requires_grad, f"output seems detached from the graph"
6767

6868
y2 = y2.detach().cpu().numpy()
69-
assert isclose(y2, y1).all(), f"y1 = {y1}, y2 = {y2}, delta = {y1 - y2}, max_delta = {abs(np.max(y1 - y2))}"
69+
assert isclose(y2, y1).all(), f"y1 = {y1}, y2 = {y2}, delta = {y1 - y2}, max_delta = {np.max(abs(y1 - y2))}"
7070

7171

7272
def test_zero_order_spherical_harmonics_laplacian():
@@ -111,4 +111,4 @@ def laplacian1(u, r, theta, phi):
111111
lap1 = lap1.detach().cpu().numpy()
112112
lap2 = lap2.detach().cpu().numpy()
113113
assert isclose(lap2, lap1).all(), \
114-
f"lap1 = {lap1}\nlap2 = {lap2}\ndelta = {lap1 - lap2}\nmax_delta = {abs(np.max(lap1 - lap2))}"
114+
f"lap1 = {lap1}\nlap2 = {lap2}\ndelta = {lap1 - lap2}\nmax_delta = {np.max(abs(lap1 - lap2))}"

0 commit comments

Comments
 (0)