adjusted faulty test

This commit is contained in:
Philip Eisenlohr 2022-03-09 19:01:45 -05:00
parent f13a4c82da
commit 4f6d9aa4b6
2 changed files with 3 additions and 3 deletions

View File

@ -972,7 +972,7 @@ class Grid:
"""
def most_frequent(stencil: np.ndarray,
selection: set,
rng: NumpyRngSeed):
rng):
me = stencil[stencil.size//2]
if not selection or me in selection:
unique, counts = np.unique(stencil,return_counts=True)

View File

@ -352,8 +352,8 @@ class TestGrid:
random.vicinity_offset(selection=selection_inverse,invert_selection=not invert)
def test_vicinity_offset_selection_empty(self,random):
assert random.vicinity_offset(selection=[],invert_selection=False) == random and \
random.vicinity_offset(selection=[],invert_selection=True) == random.vicinity_offset()
assert random.vicinity_offset(selection=None,invert_selection=False) == random.vicinity_offset() and \
random.vicinity_offset(selection=None,invert_selection=True ) == random.vicinity_offset()
@pytest.mark.parametrize('periodic',[True,False])