Possible to download test cases?

Is there a way to download the test cases for puzzles? I don’t see any button or setting for it.

In case it matters this is the puzzle I’m thinking about:

Thanks

The puzzle you mentioned is somewhat special, because it has multiple turns, and the input you receive after turn #2 depends on your previous move. What you can do is to write back to the console log the input after you read them. Here is the initial input for the first ide test case:

3 2 1
1 2
1 0
2
1

For conventional puzzles with a single turn input, there is a hamburger menu to show the test cases and you can copy-paste them to a local file.
Or, you can find 1600+ test cases for 650+ puzzles in this repo (see the .tests/input/ and .tests/expected/ directories.)

1 Like

Ah, yes I thought I’d seen some way of downloading the test cases. But it makes sense that puzzles that respond to my output is a little special.

I ended up defining a logging input so I can easily find all the inputs later:

def log(*objects):
    print(*objects, file=sys.stderr, flush=True)

def logged_input():
    s = input()
    log("INPUT:", s)
    return s

Oh and that’s an impressive amount of work in that repo you linked. Wow!