def test_list_extension(self): """Test the extend method""" data = "abcdef" urn = Urn(data, replace=False) assert urn.size() == 6 urn.extend("xy") assert urn.size() == 8
def test_list_extension_stochastic(self, replace): """Test the extend method""" data = "abcdef" urn = Urn(data, replace=replace) urn.extend("xy") assert set(["x", "y"]).issubset(set(itertools.islice(urn, 1000)))