Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
louisponet committed Jun 20, 2021
1 parent a0a9f00 commit 145501e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions test/job_control_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ tcalc = gencalc_bands(job["bands"], [(0.5,0.0,0.5,10.0),(0.0,0.0,0.0,10.0),(0.5,

push!(job, tcalc)
@test job["bands2"][:calculation] == "bands"
@test data(job, "bands2", :k_points).data == [(0.5,0.0,0.5,10.0),(0.0,0.0,0.0,10.0),(0.5,0.5,0.5,1.0)]
@test data(job["bands2"], :k_points).data == [(0.5,0.0,0.5,10.0),(0.0,0.0,0.0,10.0),(0.5,0.5,0.5,1.0)]

tcalc = gencalc_nscf(job["nscf"], (10,10,10), name="nscf2")
push!(job, tcalc)
Expand Down Expand Up @@ -274,10 +274,10 @@ DFControl.sanitize_projections!(job)
# job3 = DFJob(job4.local_dir)

# @test job3.server_dir == "/tmp"
set_data_option!(job, "scf",:k_points, :blabla, print=false)
@test data(job, "scf", :k_points).option == :blabla
set_data_option!(job["scf"],:k_points, :blabla, print=false)
@test data(job["scf"], :k_points).option == :blabla
set_data_option!(job, :k_points, :test, print=false)
@test data(job, "scf", :k_points).option == :test
@test data(job["scf"], :k_points).option == :test

rm.(DFControl.inpath.(job.calculations))
job.calculations = [job.calculations[2]]
Expand Down
2 changes: 1 addition & 1 deletion test/jobfromcif_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ save(job)
show(job)

@test data(job["scf"], :k_points).data == [6, 6, 6, 1, 1, 1]
@test data(job, "nscf", :k_points).data == DFControl.kgrid(10, 10, 10, :nscf)
@test data(job["nscf"], :k_points).data == DFControl.kgrid(10, 10, 10, :nscf)
@test all(values(job[:ecutwfc]) .== 32.0)
@test job["scf"][:prefix] == job["nscf"][:prefix] == "$name"
@test job["bands"][:verbosity] == "high"
Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ using DFControl, Test, Suppressor

testdir = @__DIR__
@time begin
@time @testset "constants" begin include("constant_tests.jl") end
@time @testset "constants" begin @suppress include("constant_tests.jl") end
@time @testset "documenation" begin @suppress include("documentation_tests.jl") end
@time @testset "Setting defaults" begin @suppress include("defaults_tests.jl") end
@time @testset "Job from CIF file" begin @suppress include("jobfromcif_tests.jl") end
@time @testset "Job control tests" begin include("job_control_tests.jl") end
@time @testset "Job control tests" begin @suppress include("job_control_tests.jl") end
@time @testset "Remove defaults" begin @suppress include("rmdefaults_tests.jl") end
end

0 comments on commit 145501e

Please sign in to comment.