コード例 #1
0
ファイル: test_quote.py プロジェクト: BY-jk/sqlalchemy
 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
ファイル: test_quote.py プロジェクト: BY-jk/sqlalchemy
 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
ファイル: test_quote.py プロジェクト: BY-jk/sqlalchemy
 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
ファイル: test_quote.py プロジェクト: BY-jk/sqlalchemy
 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)