def test_pickle_anon_label(self): q1 = _anonymous_label(quoted_name("x", True)) for loads, dumps in picklers(): q2 = loads(dumps(q1)) assert isinstance(q2, _anonymous_label) eq_(str(q1), str(q2)) eq_(q1.quote, q2.quote)
def test_rconcat_anon(self): q1 = _anonymous_label(quoted_name("x", True)) assert isinstance(q1, _anonymous_label) value = "y" + q1 assert isinstance(value, _anonymous_label) self._assert_quoted(value, True)
def test_apply_map_plain(self): q1 = _anonymous_label(quoted_name("x%s", None)) q2 = q1.apply_map(("bar")) eq_(q2, "xbar") self._assert_not_quoted(q2)
def test_apply_map_quoted(self): q1 = _anonymous_label(quoted_name("x%s", True)) q2 = q1.apply_map(("bar")) eq_(q2, "xbar") eq_(q2.quote, True)