Skip to content

Commit

Permalink
formatted test
Browse files Browse the repository at this point in the history
  • Loading branch information
RemDelaporteMathurin committed Jun 29, 2023
1 parent 2178806 commit fc92029
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion test/simulation/test_postprocessing_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ def test_pure_diffusion(self, my_sim):
assert data[i][4] == pytest.approx(11)

def test_fluxes(self, my_sim):

my_sim.T = festim.Temperature(100 * festim.x + 200)
my_sim.T.create_functions(my_sim.mesh)

Expand Down
1 change: 0 additions & 1 deletion test/system/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,6 @@ def test_run_MMS_steady_state(tmpdir):
g = sp.diff(v, festim.t) + p * v - k * u * (n_trap - v)

def run(h):

my_materials = festim.Materials(
[festim.Material(name="mat", id=1, D_0=D_0, E_D=E_D)]
)
Expand Down
3 changes: 2 additions & 1 deletion test/unit/test_boundary_conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ def test_create_expression_dc_custom():
"""Creates a dc_custom bc and checks create_expression returns
the correct expression
"""

# build
def func(T, prm1, prm2):
return 2 * T + prm1 * prm2
Expand Down Expand Up @@ -455,6 +456,7 @@ def test_create_form_flux_custom():
create_form returns
the correct form
"""

# build
def func(T, c, prm1, prm2):
return 2 * T + c + prm1 * prm2
Expand All @@ -481,7 +483,6 @@ def func(T, c, prm1, prm2):
expected_expr = 2 * expr_T + expr_c + expr_prm1 * expr_prm2
expected_expr = fenics.Expression(sp.printing.ccode(expected_expr), t=0, degree=1)
for t in range(10):

expected_expr.t = t
for expr in my_BC.sub_expressions + expressions:
expr.t = t
Expand Down
1 change: 0 additions & 1 deletion test/unit/test_concentration.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def test_get_comp_from_expression(self):
assert comp(x) == 1 + t - x

def test_get_comp_from_xdmf(self, tmpdir):

# build
value = 1 + festim.t - festim.x

Expand Down
1 change: 0 additions & 1 deletion test/unit/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def eval(self, x, values):


def test_as_constant_or_expression():

# constants
assert isinstance(as_constant_or_expression(3), Constant)
assert isinstance(as_constant_or_expression(3.0), Constant)
Expand Down
2 changes: 0 additions & 2 deletions test/unit/test_meshing.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ def test_surface_markers(self):


def test_create_mesh_xdmf(tmpdir):

# write xdmf file
mesh = fenics.UnitSquareMesh(10, 10)
file1 = tmpdir.join("mesh.xdmf")
Expand Down Expand Up @@ -202,7 +201,6 @@ def test_create_mesh_xdmf(tmpdir):


def test_subdomains_from_xdmf(tmpdir):

# create mesh functions
mesh = fenics.UnitCubeMesh(6, 6, 6)
mf_cells = fenics.MeshFunction("size_t", mesh, mesh.topology().dim())
Expand Down
1 change: 0 additions & 1 deletion test/unit/test_traps/test_extrinsic_trap.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class TestExtrinsicTrap:

my_trap = festim.ExtrinsicTrap(
1,
1,
Expand Down
1 change: 1 addition & 0 deletions test/unit/test_traps/test_trap.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ def test_user_expression_as_density(self):
"""Test that create_trapping_form creates the correct formulation when
a fenics.UserExpression is given as density
"""

# build
class CustomExpression(f.UserExpression):
def eval(self, value, x):
Expand Down

0 comments on commit fc92029

Please sign in to comment.