diff --git a/micromagneticmodel/tests/test_abstract.py b/micromagneticmodel/tests/test_abstract.py index dd5b9d0..8b13525 100644 --- a/micromagneticmodel/tests/test_abstract.py +++ b/micromagneticmodel/tests/test_abstract.py @@ -10,7 +10,7 @@ class MyDerivedClass(mm.abstract.Abstract): class TestAbstract: - def setup(self): + def setup_method(self): self.obj = MyDerivedClass(arg1=1, arg2="abc") def test_init(self): diff --git a/micromagneticmodel/tests/test_cubicanisotropy.py b/micromagneticmodel/tests/test_cubicanisotropy.py index 19cd27b..d4ee100 100644 --- a/micromagneticmodel/tests/test_cubicanisotropy.py +++ b/micromagneticmodel/tests/test_cubicanisotropy.py @@ -10,7 +10,7 @@ class TestCubicAnisotropy: - def setup(self): + def setup_method(self): mesh = df.Mesh(p1=(0, 0, 0), p2=(5, 5, 5), cell=(1, 1, 1)) Kfield = df.Field(mesh, nvdim=1, value=5e6) u1field = df.Field(mesh, nvdim=3, value=(1, 0, 0)) diff --git a/micromagneticmodel/tests/test_damping.py b/micromagneticmodel/tests/test_damping.py index 6656976..8644191 100644 --- a/micromagneticmodel/tests/test_damping.py +++ b/micromagneticmodel/tests/test_damping.py @@ -9,7 +9,7 @@ class TestDamping: - def setup(self): + def setup_method(self): mesh = df.Mesh(p1=(0, 0, 0), p2=(5, 5, 5), cell=(1, 1, 1)) field = df.Field(mesh, nvdim=1, value=0.1) diff --git a/micromagneticmodel/tests/test_dmi.py b/micromagneticmodel/tests/test_dmi.py index 8a41a75..55bc8a3 100644 --- a/micromagneticmodel/tests/test_dmi.py +++ b/micromagneticmodel/tests/test_dmi.py @@ -9,7 +9,7 @@ class TestDMI: - def setup(self): + def setup_method(self): mesh = df.Mesh(p1=(0, 0, 0), p2=(5, 5, 5), cell=(1, 1, 1)) field = df.Field(mesh, nvdim=1, value=5e-3) diff --git a/micromagneticmodel/tests/test_dynamics.py b/micromagneticmodel/tests/test_dynamics.py index e0ed585..b12fb34 100644 --- a/micromagneticmodel/tests/test_dynamics.py +++ b/micromagneticmodel/tests/test_dynamics.py @@ -6,7 +6,7 @@ class TestDynamics: - def setup(self): + def setup_method(self): self.precession = mm.Precession(gamma0=2.21e5) self.damping = mm.Damping(alpha={"r1": 1, "r2": 0.5}) self.zhangli = mm.ZhangLi(u=500, beta=0.2) diff --git a/micromagneticmodel/tests/test_energy.py b/micromagneticmodel/tests/test_energy.py index aa152c0..40d6ea3 100644 --- a/micromagneticmodel/tests/test_energy.py +++ b/micromagneticmodel/tests/test_energy.py @@ -6,7 +6,7 @@ class TestEnergy: - def setup(self): + def setup_method(self): self.exchange = mm.Exchange(A=1e-12) self.zeeman = mm.Zeeman(H=(0, 0, 1.2e6)) self.uniaxialanisotropy = mm.UniaxialAnisotropy(K=1e4, u=(0, 1, 0)) diff --git a/micromagneticmodel/tests/test_exchange.py b/micromagneticmodel/tests/test_exchange.py index 4443125..7d8cbd2 100644 --- a/micromagneticmodel/tests/test_exchange.py +++ b/micromagneticmodel/tests/test_exchange.py @@ -9,7 +9,7 @@ class TestExchange: - def setup(self): + def setup_method(self): mesh = df.Mesh(p1=(0, 0, 0), p2=(5, 5, 5), cell=(1, 1, 1)) field = df.Field(mesh, nvdim=1, value=5e-12) diff --git a/micromagneticmodel/tests/test_magnetoelastic.py b/micromagneticmodel/tests/test_magnetoelastic.py index 9a91ee3..81ff464 100644 --- a/micromagneticmodel/tests/test_magnetoelastic.py +++ b/micromagneticmodel/tests/test_magnetoelastic.py @@ -9,7 +9,7 @@ class TestMagnetoElastic: - def setup(self): + def setup_method(self): mesh = df.Mesh(p1=(0, 0, 0), p2=(5, 5, 5), cell=(1, 1, 1)) B1field = df.Field(mesh, nvdim=1, value=5e6) B2field = df.Field(mesh, nvdim=1, value=7e6) diff --git a/micromagneticmodel/tests/test_precession.py b/micromagneticmodel/tests/test_precession.py index 152de3a..afda4a3 100644 --- a/micromagneticmodel/tests/test_precession.py +++ b/micromagneticmodel/tests/test_precession.py @@ -9,7 +9,7 @@ class TestPrecession: - def setup(self): + def setup_method(self): mesh = df.Mesh(p1=(0, 0, 0), p2=(5, 5, 5), cell=(1, 1, 1)) field = df.Field(mesh, nvdim=1, value=5e-12) diff --git a/micromagneticmodel/tests/test_rkky.py b/micromagneticmodel/tests/test_rkky.py index ce2d375..e457398 100644 --- a/micromagneticmodel/tests/test_rkky.py +++ b/micromagneticmodel/tests/test_rkky.py @@ -8,7 +8,7 @@ class TestRKKY: - def setup(self): + def setup_method(self): self.valid_args = [(1, ["a", "b"]), (-1, ["a", "bc"]), (0, ["r1", "r2"])] self.invalid_args = [("a", ["a", "b"]), (-1, "a"), (0, 0)] diff --git a/micromagneticmodel/tests/test_slonczewski.py b/micromagneticmodel/tests/test_slonczewski.py index 5afae68..1c411b2 100644 --- a/micromagneticmodel/tests/test_slonczewski.py +++ b/micromagneticmodel/tests/test_slonczewski.py @@ -10,7 +10,7 @@ class TestSlonczewski: - def setup(self): + def setup_method(self): mesh = df.Mesh(p1=(0, 0, 0), p2=(5, 5, 5), cell=(1, 1, 1)) field = df.Field(mesh, nvdim=1, value=5e-12) diff --git a/micromagneticmodel/tests/test_system.py b/micromagneticmodel/tests/test_system.py index e966d32..82aeeb0 100644 --- a/micromagneticmodel/tests/test_system.py +++ b/micromagneticmodel/tests/test_system.py @@ -7,7 +7,7 @@ class TestSystem: - def setup(self): + def setup_method(self): p1 = (0, 0, 0) p2 = (10e-9, 10e-9, 10e-9) n = (10, 10, 10) diff --git a/micromagneticmodel/tests/test_uniaxialanisotropy.py b/micromagneticmodel/tests/test_uniaxialanisotropy.py index 0c62ddb..0ebcaee 100644 --- a/micromagneticmodel/tests/test_uniaxialanisotropy.py +++ b/micromagneticmodel/tests/test_uniaxialanisotropy.py @@ -10,7 +10,7 @@ class TestUniaxialAnisotropy: - def setup(self): + def setup_method(self): mesh = df.Mesh(p1=(0, 0, 0), p2=(5, 5, 5), cell=(1, 1, 1)) Kfield = df.Field(mesh, nvdim=1, value=5e6) ufield = df.Field(mesh, nvdim=3, value=(1, 0, 0)) diff --git a/micromagneticmodel/tests/test_zeeman.py b/micromagneticmodel/tests/test_zeeman.py index 20bd46e..7633919 100644 --- a/micromagneticmodel/tests/test_zeeman.py +++ b/micromagneticmodel/tests/test_zeeman.py @@ -10,7 +10,7 @@ class TestZeeman: - def setup(self): + def setup_method(self): mesh = df.Mesh(p1=(0, 0, 0), p2=(5, 5, 5), cell=(1, 1, 1)) field = df.Field(mesh, nvdim=3, value=(-1e5, 0, 1e6)) diff --git a/micromagneticmodel/tests/test_zhangli.py b/micromagneticmodel/tests/test_zhangli.py index 37a52ce..2f8c340 100644 --- a/micromagneticmodel/tests/test_zhangli.py +++ b/micromagneticmodel/tests/test_zhangli.py @@ -9,7 +9,7 @@ class TestZhangLi: - def setup(self): + def setup_method(self): self.valid_args = [ (1, 1), (-1.0, 2.0),