Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 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)
Exemplo n.º 5
0
 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)
Exemplo n.º 6
0
 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)
Exemplo n.º 7
0
 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)
Exemplo n.º 8
0
 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)