Skip to content

Commit 1437040

Browse files
committed
Fix various tiny bugs which caused warnings in Pytest
1 parent a3e0f6e commit 1437040

File tree

6 files changed

+14
-6
lines changed

6 files changed

+14
-6
lines changed

fidimag/common/chain_method_base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,9 @@ def initialise_integrator(self,
436436
self.n_dofs_image,
437437
mass=1,
438438
stepsize=1e-4)
439-
self.integrator.set_options()
439+
# Note: disabled as at the moment, set_options does not
440+
# do anything for the Verlet integrator!
441+
# self.integrator.set_options()
440442
# In Verlet algorithm we only use the total force G and not YxYxG:
441443
self._llg_evolve = False
442444
else:

fidimag/common/chain_method_integrators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def run_until(self, t):
8686
return 0
8787

8888
def set_options(self, rtol=1e-8, atol=1e-8):
89-
warnings.warn("Tolerances not available for VerletIntegrator")
89+
raise NotImplementedError("Tolerances not available for VerletIntegrator")
9090

9191
def _step(self, t, y, h, f):
9292
"""

fidimag/common/nebm_spherical.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414

1515
class NEBM_Spherical(ChainMethodBase):
16-
"""
16+
r"""
1717
1818
ARGUMENTS -----------------------------------------------------------------
1919

setup.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,5 +260,11 @@ def glob_files(path, excludes, extension="*.cpp"):
260260
'fidimag.extensions',
261261
'fidimag.common',
262262
],
263-
ext_modules=cythonize(ext_modules, nthreads=nthreads, compiler_directives={'linetrace': True}),
263+
ext_modules=cythonize(ext_modules,
264+
nthreads=nthreads,
265+
compiler_directives={
266+
'linetrace': True,
267+
'language_level': '3',
268+
}
269+
),
264270
)

tests/test_skyrmion_number.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def init_m_multiple_sks(pos, r, sk_pos):
4949

5050

5151
def test_skx_num_atomistic():
52-
"""
52+
r"""
5353
Test the *finite spin chirality* or skyrmion number for
5454
a discrete spins simulation in a two dimensional lattice
5555

tests/test_stt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
def test_sst_field_1d():
6-
"""
6+
r"""
77
This is a direct test of the STT C library
88
We create a 1-D 4 spins system along the x direction with the
99
following components:

0 commit comments

Comments
 (0)