MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_columns

Method test_columns

test/sql/test_external_traversal.py:2742–2756  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2740 t2 = table("table2", column("col1"), column("col2"), column("col3"))
2741
2742 def test_columns(self):
2743 s = t1.select()
2744 self.assert_compile(
2745 s, "SELECT table1.col1, table1.col2, table1.col3 FROM table1"
2746 )
2747 select_copy = s.add_columns(column("yyy"))
2748 self.assert_compile(
2749 select_copy,
2750 "SELECT table1.col1, table1.col2, table1.col3, yyy FROM table1",
2751 )
2752 is_not(s.selected_columns, select_copy.selected_columns)
2753 is_not(s._raw_columns, select_copy._raw_columns)
2754 self.assert_compile(
2755 s, "SELECT table1.col1, table1.col2, table1.col3 FROM table1"
2756 )
2757
2758 def test_froms(self):
2759 s = t1.select()

Callers

nothing calls this directly

Calls 5

columnFunction · 0.90
is_notFunction · 0.90
assert_compileMethod · 0.80
selectMethod · 0.45
add_columnsMethod · 0.45

Tested by

no test coverage detected