Closed certik closed 7 months ago
The test is flaky: https://github.com/lcompilers/lpython/blob/496f29efc65cddd0f47721ebfed356f86b5f2389/integration_tests/test_random_02.py#L9, one can't test random numbers like that.
I thought we already tackled this issue before with @Shaikh-Ubaid in LFortran. One must test random numbers using tests designed for random numbers: they pass with very high probability (=every time in practice). The above test is low probability, that one can even trigger a failure at a CI. So that's a bad test. We need to improve it.
A good test exists in LFortran. The test in LPython was more for completeness or as measure of extra safety.
Since, it already has tests in LFortran, do we still need to add a similar test for LPython?
Just test it in some way that is robust in LPython as well, to ensure that everything works.
I have added a PR for it. The new testcase's aim is to test whther the distribution is uniform. I think it's a more valuable test compared to original version
I think this is fixed now.
https://github.com/lcompilers/lpython/actions/runs/7939986580/job/21680720142?pr=2540