Remix.run Logo
thih9 10 hours ago

Example output if anyone else is curious:

    def fragile(x):
        lst = [None]
        lst[x - 42]
        return "ok"
    
    def test_fragile():
        assert fragile(42) == "ok"
andrekandre 6 hours ago | parent [-]

this doesn't seem like a very useful test...? i'm more interested in the failure modes when input != 42, what happens when i pass NaN to that etc...

jmo, but tests should be a chance to improve the implementation of functions not just one-off "write and forget" confirmations of the happy path only... automating all that just short-circuits that whole process... but maybe i'm missing something.