Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_no_op(self):
expected = self.df
result = msno.nullity_sort(self.df, sort=None)
assert result.equals(expected)
def test_descending_sort(self):
result = msno.nullity_sort(self.df, sort='descending')
expected = self.df.iloc[[0, 1, 2]]
assert result.equals(expected)
def test_ascending_sort(self):
result = msno.nullity_sort(self.df, sort='ascending')
expected = self.df.iloc[[2, 1, 0]]
assert result.equals(expected)