<commit_before>module PlotsTests

include("imgcomp.jl")

# don't actually show the plots
srand(1234)
default(show=false)
img_eps = 5e-2

facts("Gadfly") do
    @fact gadfly() --> Plots.GadflyBackend()
    @fact backend() --> Plots.GadflyBackend()

    @fact typeof(plot(1:10)) --> Plots.Plot{Plots.GadflyBackend}
    @fact plot(Int[1,2,3], rand(3)) --> not(nothing)
    @fact plot(sort(rand(10)), rand(Int, 10, 3)) --> not(nothing)
    @fact plot!(rand(10,3), rand(10,3)) --> not(nothing)

    image_comparison_facts(:gadfly, skip=[4,6,19,23,24,27], eps=img_eps)
end

facts("PyPlot") do
    @fact pyplot() --> Plots.PyPlotBackend()
    @fact backend() --> Plots.PyPlotBackend()

    image_comparison_facts(:pyplot, skip=[19,23], eps=img_eps)
end

facts("GR") do
    @fact gr() --> Plots.GRBackend()
    @fact backend() --> Plots.GRBackend()

    image_comparison_facts(:gr, only=[1], eps=img_eps)
end

facts("Plotly") do
    @fact plotly() --> Plots.PlotlyBackend()
    @fact backend() --> Plots.PlotlyBackend()

    # # until png generation is reliable on OSX, just test on linux
    # @linux_only image_comparison_facts(:plotly, only=[1,3,4,7,8,9,10,11,12,14,15,20,22,23,27], eps=img_eps)
end

FactCheck.exitstatus()
end # module<commit_msg>gr tests linux_only<commit_after>module PlotsTests

include("imgcomp.jl")

# don't actually show the plots
srand(1234)
default(show=false)
img_eps = 5e-2

facts("Gadfly") do
    @fact gadfly() --> Plots.GadflyBackend()
    @fact backend() --> Plots.GadflyBackend()

    @fact typeof(plot(1:10)) --> Plots.Plot{Plots.GadflyBackend}
    @fact plot(Int[1,2,3], rand(3)) --> not(nothing)
    @fact plot(sort(rand(10)), rand(Int, 10, 3)) --> not(nothing)
    @fact plot!(rand(10,3), rand(10,3)) --> not(nothing)

    image_comparison_facts(:gadfly, skip=[4,6,19,23,24,27], eps=img_eps)
end

facts("PyPlot") do
    @fact pyplot() --> Plots.PyPlotBackend()
    @fact backend() --> Plots.PyPlotBackend()

    image_comparison_facts(:pyplot, skip=[19,23], eps=img_eps)
end

facts("GR") do
    @fact gr() --> Plots.GRBackend()
    @fact backend() --> Plots.GRBackend()

    @linux_only image_comparison_facts(:gr, only=[1], eps=img_eps)
end

facts("Plotly") do
    @fact plotly() --> Plots.PlotlyBackend()
    @fact backend() --> Plots.PlotlyBackend()

    # # until png generation is reliable on OSX, just test on linux
    # @linux_only image_comparison_facts(:plotly, only=[1,3,4,7,8,9,10,11,12,14,15,20,22,23,27], eps=img_eps)
end

FactCheck.exitstatus()
end # module
{'fraction_non_alphanumeric': 0.1849041533546326, 'fraction_numerical': 0.050319488817891375, 'mean_word_length': 4.493421052631579, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3257678', 'n_tokens_mistral': 1060, 'n_tokens_neox': 958, 'n_words': 186}