Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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)