1515from z2pack ._utils import _get_max_move
1616
1717
18- def pytest_addoption (parser ): # pylint: disable=missing-docstring
18+ def pytest_addoption (parser ): # pylint: disable=missing-function- docstring
1919 parser .addoption ('-A' , action = 'store_true' , help = 'run ABINIT tests' )
2020 parser .addoption ('-V' , action = 'store_true' , help = 'run VASP tests' )
2121 parser .addoption (
@@ -28,7 +28,7 @@ def pytest_addoption(parser): # pylint: disable=missing-docstring
2828 )
2929
3030
31- def pytest_configure (config ): # pylint: disable=missing-docstring
31+ def pytest_configure (config ): # pylint: disable=missing-function- docstring
3232 # register additional marker
3333 config .addinivalue_line (
3434 "markers" , "abinit: mark tests which run with ABINIT"
@@ -39,7 +39,7 @@ def pytest_configure(config): # pylint: disable=missing-docstring
3939 )
4040
4141
42- def pytest_runtest_setup (item ): # pylint: disable=missing-docstring
42+ def pytest_runtest_setup (item ): # pylint: disable=missing-function- docstring
4343 try :
4444 abinit_marker = item .get_marker ("abinit" )
4545 vasp_marker = item .get_marker ("vasp" )
@@ -68,7 +68,6 @@ def test_name(request):
6868@pytest .fixture
6969def compare_data (request , test_name , scope = "session" ):
7070 """Returns a function which either saves some data to a file or (if that file exists already) compares it to pre-existing data using a given comparison function."""
71-
7271 def inner (compare_fct , data , tag = None ):
7372 full_name = test_name + (tag or '' )
7473 val = request .config .cache .get (full_name , None )
@@ -80,13 +79,10 @@ def inner(compare_fct, data, tag=None):
8079 )
8180 )
8281 raise ValueError ('Reference data does not exist.' )
83- else :
84- assert compare_fct (
85- val ,
86- json .loads (
87- json .dumps (data , default = z2pack .io ._encoding .encode )
88- )
89- ) # get rid of json-specific quirks
82+ assert compare_fct (
83+ val ,
84+ json .loads (json .dumps (data , default = z2pack .io ._encoding .encode ))
85+ ) # get rid of json-specific quirks
9086
9187 return inner
9288
@@ -99,7 +95,6 @@ def compare_equal(compare_data):
9995@pytest .fixture
10096def compare_wcc (compare_data ):
10197 """Checks whether two lists of WCC (or nested lists of WCC) are almost equal, up to a periodic shift."""
102-
10398 def check_wcc (wcc0 , wcc1 ):
10499 """
105100 Check that two sets of WCC are equal.
@@ -119,7 +114,6 @@ def sample():
119114 """
120115 Returns the path to the sample of the given name.
121116 """
122-
123117 def inner (name ):
124118 return os .path .join (
125119 os .path .join (
0 commit comments