-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clean up testing console output (#169)
* clean up testing console output
- Loading branch information
Showing
8 changed files
with
54 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
module symmetry_test | ||
|
||
using Xtals | ||
using Test | ||
using IOCapture, Test, Xtals | ||
|
||
# Test set for making sure simulations meet certain rules | ||
# i.e. frameworks musts be in P1 symmetry to be used in GCMC or Henry | ||
# coefficient test | ||
@testset "P1 Symmetry Tests" begin | ||
non_P1_framework = Crystal("symmetry_test_structure.cif", convert_to_p1=false) | ||
# Test that an assertion is thrown when trying to replicate a non-P1 | ||
# structure | ||
@test_throws ErrorException replicate(non_P1_framework, (2, 2, 2)) | ||
@test_throws ErrorException replicate(non_P1_framework, (1, 1, 1)) | ||
|
||
IOCapture.capture() do | ||
non_P1_framework = Crystal("symmetry_test_structure.cif", convert_to_p1=false) | ||
# Test that an assertion is thrown when trying to replicate a non-P1 | ||
# structure | ||
@test_throws ErrorException replicate(non_P1_framework, (2, 2, 2)) | ||
@test_throws ErrorException replicate(non_P1_framework, (1, 1, 1)) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,30 @@ | ||
testfiles = [ | ||
"crystal.jl", | ||
"bonds.jl", | ||
"misc.jl", | ||
"matter.jl", | ||
"distance.jl", | ||
"box.jl", | ||
"assert_p1_symmetry.jl", | ||
"crystal.jl" | ||
"bonds.jl" | ||
"misc.jl" | ||
"matter.jl" | ||
"distance.jl" | ||
"box.jl" | ||
"assert_p1_symmetry.jl" | ||
"paths.jl" | ||
] | ||
|
||
@assert VERSION.major == 1 | ||
@assert VERSION.minor ≥ 6 | ||
@assert (VERSION.major == 1) && (VERSION.minor ≥ 6) "Minimum Julia version not met." | ||
|
||
using Documenter, IOCapture, Logging, Test, Xtals | ||
|
||
using Test, Documenter, Xtals, Graphs, MetaGraphs | ||
Xtals.banner() | ||
|
||
for testfile ∈ testfiles | ||
@info "Running test/$testfile" | ||
@time include(testfile) | ||
with_logger(NullLogger()) do | ||
include(testfile) | ||
end | ||
end | ||
|
||
# run doctests unless disabled via environment variable | ||
if "doctest" ∉ keys(ENV) || ENV["doctest"] ≠ "false" | ||
@time doctest(Xtals) | ||
doctest(Xtals) | ||
end | ||
|
||
@info "Done." |