From 318f361f6123c3e1813ff86bffcb203bcd909b3b Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Tue, 12 Nov 2019 01:10:58 -0800 Subject: [PATCH] some cleanup --- meanas/test/test_fdfd.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/meanas/test/test_fdfd.py b/meanas/test/test_fdfd.py index 533ef91..43eba25 100644 --- a/meanas/test/test_fdfd.py +++ b/meanas/test/test_fdfd.py @@ -1,11 +1,12 @@ +# pylint: disable=redefined-outer-name from typing import List, Tuple import dataclasses import pytest import numpy -from numpy.testing import assert_allclose, assert_array_equal +#from numpy.testing import assert_allclose, assert_array_equal from .. import fdfd, vec, unvec -from .utils import assert_close, assert_fields_close, PRNG +from .utils import assert_close, assert_fields_close def test_residual(sim): @@ -39,7 +40,8 @@ def test_poynting_planes(sim): e_dot_j = sim.e * sim.j * sim.dxes[0][0][:, None, None] * sim.dxes[0][1][None, :, None] * sim.dxes[0][2][None, None, :] src_energy = -e_dot_j[:, mask].real / 2 - assert_close(sum(planes), src_energy.sum(), rtol=2e-5) # TODO why is the tolerance so bad? + assert_close(sum(planes), src_energy.sum()) + #####################################