mirror of
https://gitlab.cern.ch/wotsubo/PSBoardDataBase.git
synced 2025-06-07 21:45:43 +09:00
- currently, test automatically opens sqlitebrowser - ext package is not well checked
28 lines
958 B
Julia
28 lines
958 B
Julia
using Test
|
|
using PSBoardDataBase
|
|
using CSV, DataFrames
|
|
|
|
true || include("../src/PSBoardDataBase.jl")
|
|
|
|
@testset "PSBoardDataBase" begin
|
|
dbpath = tempname()
|
|
db = PSBoardDataBase.create_database(dbpath)
|
|
@info "" db
|
|
|
|
@test PSBoardDataBase.insert_qaqc_campaign_id(db) |> isnothing
|
|
@test PSBoardDataBase.insert_qaqc_positions(db) |> isnothing
|
|
|
|
single_result_df =
|
|
CSV.read("input/PS board QAQC Data Base - 本番1回試験・追加検証試験.csv", DataFrame)
|
|
runlist_table = CSV.read("input/PS board QAQC Data Base - RUNLIST.csv", DataFrame)
|
|
|
|
@test PSBoardDataBase.prepare_single_result_df(single_result_df) isa DataFrame
|
|
|
|
@test PSBoardDataBase.add_psboard_ids(db, single_result_df) |> isnothing
|
|
@test PSBoardDataBase.add_qaqc_runlist(db, runlist_table) |> isnothing
|
|
|
|
@test PSBoardDataBase.add_qaqc_single_result(db, single_result_df, runlist_table) |>
|
|
isnothing
|
|
|
|
run(`sqlitebrowser $dbpath`)
|
|
end
|