benoitseron / BosonSampling.jl

Boson sampling tools for Julia
MIT License
26 stars 5 forks source link

@test_nowarn fails because of /src/partitions/partitions.jl:148 #61

Closed AntoineRestivo closed 2 years ago

AntoineRestivo commented 2 years ago

@benoitseron Any idea to solve this? Perhaps another command than @test_nowarn or remove the warning in case it is no more useful

AntoineRestivo commented 2 years ago

The point is, @nowarn is quiet relevant here as some test in the examples usage are meant to fail.

benoitseron commented 2 years ago

I'm not sure why you would need @nowarn? Where do you use that exactly? I think warnings are quite important in our code so removing them would be losing some info for users.

AntoineRestivo commented 2 years ago

A simple @test would not be useful as it would break (most of the time) because of @test pb/ppd > 1. for instance (line 34 in example usage)

benoitseron commented 2 years ago

But in these cases it doesn't need to break, just warn

AntoineRestivo commented 2 years ago

If we use @test for the examples usage file, the fact that @test pb/ppd > 1. fails leads to an additional error in @test example_usage.jl. Using @test_nowarn would take care of this but still gives an error due to some warnings. Whether we use @test or @test_nowar, running example_usage.jl leads to failures in the test report that are not relevant.

benoitseron commented 2 years ago

Well this @test pb/ppd > 1. shouldn't fail no? Except for the special counter example

AntoineRestivo commented 2 years ago

Oh right I thought it was not fixed yet. Well, I don't see where the error comes from then. By running example_usage by hand, everything works fine indeed but still returns an error in the @test.

AntoineRestivo commented 2 years ago

Ok I got it!