Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 8, 2024
1 parent 014258a commit af75b02
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tests/test_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class TestQ4ElementK:
@pytest.fixture()
@pytest.fixture
def q4element_k_instance(self):
return Q4Element_K(e=1.0, nu=1 / 3, dx=0.5, dy=0.5)

Expand All @@ -16,7 +16,7 @@ def test_element(self, q4element_k_instance):


class TestQ4ElementT:
@pytest.fixture()
@pytest.fixture
def q4element_t_instance(self):
return Q4Element_T(k=1.0, dx=0.5, dy=0.5)

Expand Down
10 changes: 5 additions & 5 deletions tests/test_fea2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
from tofea.fea2d import FEA2D_K, FEA2D_T


@pytest.fixture()
@pytest.fixture
def rng():
seed = 36523523
return np.random.default_rng(seed)


class TestFEA2DK:
@pytest.fixture()
@pytest.fixture
def fea2d_k_instance(self):
fixed = np.zeros((5, 5, 2), dtype=bool)
fixed[0] = 1
return FEA2D_K(fixed)

@pytest.fixture()
@pytest.fixture
def x_and_b(self, fea2d_k_instance, rng):
x = rng.random(fea2d_k_instance.shape)
b = rng.random(fea2d_k_instance.fixed.shape)
Expand Down Expand Up @@ -68,13 +68,13 @@ def test_compliance_grads(self, fea2d_k_instance, x_and_b, rng):


class TestFEA2DT:
@pytest.fixture()
@pytest.fixture
def fea2d_t_instance(self):
fixed = np.zeros((5, 5), dtype=bool)
fixed[0, 0] = 1
return FEA2D_T(fixed)

@pytest.fixture()
@pytest.fixture
def x_and_b(self, fea2d_t_instance, rng):
x = rng.random(fea2d_t_instance.shape)
b = rng.random(fea2d_t_instance.fixed.shape)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tofea.solvers import get_solver


@pytest.fixture()
@pytest.fixture
def rng():
seed = 36523525
return np.random.default_rng(seed)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from tofea.solvers import get_solver


@pytest.fixture()
@pytest.fixture
def rng():
seed = 36523525
return np.random.default_rng(seed)
Expand Down

0 comments on commit af75b02

Please sign in to comment.