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

Function TestSQLFSWriterCreate

go/sqlfs/writer_test.go:48–64  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

46}
47
48func TestSQLFSWriterCreate(t *testing.T) {
49 createSQLFSTestingDatabaseOnce.Do(createSQLFSTestingDatabase)
50 db := database.GetTestingDBSingleton()
51 a := assert.New(t)
52
53 tbl := fmt.Sprintf("%s.unittest%d", testDatabaseName, rand.Int())
54 w, e := Create(db, tbl, database.GetSessionFromTestingDB())
55 a.NoError(e)
56 a.NotNil(w)
57 defer w.Close()
58
59 has, e1 := hasTable(db.DB, tbl)
60 a.NoError(e1)
61 a.True(has)
62
63 a.NoError(dropTableIfExists(db.DB, tbl))
64}

Callers

nothing calls this directly

Calls 7

GetTestingDBSingletonFunction · 0.92
GetSessionFromTestingDBFunction · 0.92
hasTableFunction · 0.85
IntMethod · 0.80
CreateFunction · 0.70
dropTableIfExistsFunction · 0.70
CloseMethod · 0.45

Tested by

no test coverage detected