MCPcopy Create free account
hub / github.com/sql-machine-learning/sqlflow / TestStepSQLWithComment

Function TestStepSQLWithComment

go/cmd/step/step_test.go:63–76  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

61}
62
63func TestStepSQLWithComment(t *testing.T) {
64 if os.Getenv("SQLFLOW_TEST_DB") != "mysql" {
65 t.Skip("skip no mysql test.")
66 }
67 a := assert.New(t)
68 session := makeTestSession(database.GetTestingMySQLURL())
69 sql := `-- this is comment {a.b}
70 SELECT 1, 'a';\n\t
71`
72 _, e := step.GetStdout(func() error {
73 return run(sql, session)
74 })
75 a.NoError(e)
76}

Callers

nothing calls this directly

Calls 4

GetTestingMySQLURLFunction · 0.92
GetStdoutFunction · 0.92
makeTestSessionFunction · 0.70
runFunction · 0.70

Tested by

no test coverage detected