adjusted faulty test
This commit is contained in:
parent
f13a4c82da
commit
4f6d9aa4b6
|
@ -972,7 +972,7 @@ class Grid:
|
||||||
"""
|
"""
|
||||||
def most_frequent(stencil: np.ndarray,
|
def most_frequent(stencil: np.ndarray,
|
||||||
selection: set,
|
selection: set,
|
||||||
rng: NumpyRngSeed):
|
rng):
|
||||||
me = stencil[stencil.size//2]
|
me = stencil[stencil.size//2]
|
||||||
if not selection or me in selection:
|
if not selection or me in selection:
|
||||||
unique, counts = np.unique(stencil,return_counts=True)
|
unique, counts = np.unique(stencil,return_counts=True)
|
||||||
|
|
|
@ -352,8 +352,8 @@ class TestGrid:
|
||||||
random.vicinity_offset(selection=selection_inverse,invert_selection=not invert)
|
random.vicinity_offset(selection=selection_inverse,invert_selection=not invert)
|
||||||
|
|
||||||
def test_vicinity_offset_selection_empty(self,random):
|
def test_vicinity_offset_selection_empty(self,random):
|
||||||
assert random.vicinity_offset(selection=[],invert_selection=False) == random and \
|
assert random.vicinity_offset(selection=None,invert_selection=False) == random.vicinity_offset() and \
|
||||||
random.vicinity_offset(selection=[],invert_selection=True) == random.vicinity_offset()
|
random.vicinity_offset(selection=None,invert_selection=True ) == random.vicinity_offset()
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('periodic',[True,False])
|
@pytest.mark.parametrize('periodic',[True,False])
|
||||||
|
|
Loading…
Reference in New Issue