def test_salt_and_pepper_noise_with_min_max(self):
        """ test the salt and pepper function with specified min and max values.
        """
        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)
 test the salt and pepper function with specified min and max values.
        
tests/test_utils.py