Skip to content

Commit

Permalink
Remove any files stored in test/images (#195)
Browse files Browse the repository at this point in the history
* Remove any files stored in test/images

* Removed file check and created it as a unit test

* Unit test for test/images dir to check for additional files

* Added formatting
  • Loading branch information
TheCedarPrince authored Sep 22, 2020
1 parent e32c4a4 commit d59f1ae
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/unit.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
@testset "unit tests" begin

@testset "tmpdir" begin

#=
Leftover files from failed tests or errors can cause testing errors.
Therefore, we remove any files in the `images` directory not pertinent to testing before executing a test.
=#

EXCLUDE_FILES = [".keep"]
for f in readdir("images")
!(f in EXCLUDE_FILES) && rm("images/$f")
end
@test length(readdir("images")) == length(EXCLUDE_FILES)
end

@testset "projection" begin
x0 = Line(Point(0, 10), O)
p = Point(10, 20)
Expand Down

0 comments on commit d59f1ae

Please sign in to comment.