MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_columns

Method test_columns

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

Source from the content-addressed store, hash-verified

2724 t2 = table("table2", column("col1"), column("col2"), column("col3"))
2725
2726 def test_columns(self):
2727 s = t1.select()
2728 self.assert_compile(
2729 s, "SELECT table1.col1, table1.col2, table1.col3 FROM table1"
2730 )
2731 select_copy = s.add_columns(column("yyy"))
2732 self.assert_compile(
2733 select_copy,
2734 "SELECT table1.col1, table1.col2, table1.col3, yyy FROM table1",
2735 )
2736 is_not(s.selected_columns, select_copy.selected_columns)
2737 is_not(s._raw_columns, select_copy._raw_columns)
2738 self.assert_compile(
2739 s, "SELECT table1.col1, table1.col2, table1.col3 FROM table1"
2740 )
2741
2742 def test_froms(self):
2743 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