def send(self, data, *more, sep=" ", end="\n"): return self._output.append(joins(data, *more, sep=sep) + end)
def test_joins_given_separator(): """Test that we can join with a given separator.""" assert funcs.joins(10, 2, 2014, sep="/") == "10/2/2014"
def test_joins_empty_strings(): """Test that it won't bother joining a sequence of empty strings.""" assert funcs.joins("", "", "") == ""
def test_joins_non_strings(): """Test that we can join both strings and non-strings.""" assert funcs.joins("test", "number", 3) == "test number 3"
def test_joins_strings(): """Test that we can join some strings.""" assert funcs.joins("this ", "is a", "test") == "this is a test"
def test_joins_nothing(): """Test that joining nothing gets us nothing.""" assert funcs.joins() == ""