starlarky icon indicating copy to clipboard operation
starlarky copied to clipboard

No tests for random library

Open mjallday opened this issue 5 months ago • 0 comments

Problem or feature statement

https://github.com/python/cpython/blob/main/Lib/test/test_random.py - these tests have not been ported

I ran into a bug when trying to use random.randrange via `randrange(1, 100).

Received error from script engine: randrange() missing 1 required positional argument: stop in <builtin> at line number 0 at column number 0
Traceback (most recent call last):
    File "larky.star", line 73, column 28, in process
    Error in randrange: randrange() missing 1 required positional argument: stop.
Request id: 30eaab82df833ef3de097ddb5a57b57d.'

Advised solution

Add tests, fix method

Testing scenarios

See link

mjallday avatar Jan 31 '24 16:01 mjallday