'test the salt and pepper function with specified min and max values.'

def test_salt_and_pepper_noise_with_min_max(self):

    x_sp = utils.salt_and_pepper_noise(self.x, self.v, 0, 1)
    for sample in x_sp:
        salted_elems = sum([((i == 0) or (i == 1)) for i in sample])
        self.assertEqual(salted_elems, self.v)
