From b082a4df41b7b6b12e26e554d8c383d61eb9dfe2 Mon Sep 17 00:00:00 2001 From: Rik Huijzer Date: Fri, 13 May 2022 10:17:58 +0200 Subject: [PATCH 1/2] Remove unused argument in test helper function --- test/runtests.jl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 091f8f4..07c8842 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -38,14 +38,14 @@ sumpoint(p::Point3D, x, y, z) = p + Point3D(x, y, z) @test db isa SQLite.DB end -Copy test sqlite file to temp directory, path `test.sqlite`, +Copy test sqlite file to temp directory, path `tmp_dor/test.sqlite`, overwrite file if necessary and set permissions. """ -function setup_clean_test_db(f::Function, args...) +function setup_clean_test_db(f::Function) dbfile = joinpath(dirname(pathof(SQLite)), "../test/Chinook_Sqlite.sqlite") tmp_dir = mktempdir() test_dbfile = joinpath(tmp_dir, "test.sqlite") - + cp(dbfile, test_dbfile; force = true) chmod(test_dbfile, 0o777) @@ -82,18 +82,18 @@ end setup_clean_test_db() do db results1 = SQLite.tables(db) - + @test isa(results1, SQLite.DBTables) @test length(results1) == 11 @test isa(results1[1], SQLite.DBTable) - + @test Tables.istable(results1) @test Tables.rowaccess(results1) @test Tables.rows(results1) == results1 - + @test results1[1].name == "Album" @test results1[1].schema == Tables.schema(DBInterface.execute(db,"SELECT * FROM Album LIMIT 0")) - + @test SQLite.DBTable("Album") == SQLite.DBTable("Album", nothing) @test [t.name for t in results1] == ["Album", "Artist", "Customer", "Employee", "Genre", "Invoice", "InvoiceLine", "MediaType", "Playlist", "PlaylistTrack", "Track"] From 095ace7dfcb6e05a4e9b170aa4f9b43a1e023f56 Mon Sep 17 00:00:00 2001 From: Rik Huijzer Date: Fri, 13 May 2022 10:18:32 +0200 Subject: [PATCH 2/2] Fix typo --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 07c8842..bcd902d 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -38,7 +38,7 @@ sumpoint(p::Point3D, x, y, z) = p + Point3D(x, y, z) @test db isa SQLite.DB end -Copy test sqlite file to temp directory, path `tmp_dor/test.sqlite`, +Copy test sqlite file to temp directory, path `tmp_dir/test.sqlite`, overwrite file if necessary and set permissions. """ function setup_clean_test_db(f::Function)