def test_single_none(self): """Test comma join with None.""" r = tools.join_comma(obj=None) assert r == ""
def test_non_list(self): """Test comma non list.""" r = tools.join_comma(obj="x") assert r == "x"
def test_empty_list(self): """Test comma empty list.""" r = tools.join_comma(obj=[]) assert r == ""
def test_single(self): """Test comma join list with single item.""" r = tools.join_comma(obj=["x"]) assert r == "x"
def test_multi_with_empty_true(self): """Test comma join list with multi items with empty=True.""" r = tools.join_comma(obj=["x", "", "a", None, "c"], empty=True) assert r == "x, , a, None, c"
def test_multi_with_empty_false(self): """Test comma join multi with empty=False.""" r = tools.join_comma(obj=["x", "", "a", None, "c", []], empty=False) assert r == "x, a, c"
def test_multi_no_indent(self): """Test comma join multi with indent=False.""" r = tools.join_comma(obj=["x", "a", "c"], indent=False) assert r == "x,a,c"
def test_multi(self): """Test comma join multi.""" r = tools.join_comma(obj=["x", "a", "c"]) assert r == "x, a, c"