Test suite

test-suite v1

What a pass decides

The command {command} exits with status 0 on the resulting tree, with no network, in runner image {image}. This claim did not change {protected}.

What a pass does not decide

That the tests are sufficient. That the code is correct beyond them.

Parameters

Parameters a task supplies
NameTypeRequiredDefault
commandlist of stringsYes—
workdirstringNo—
protectedlist of stringsYes—
timeout_sintegerNo300

Paths covered and protected

A claim on a task bound to this checker may write only the paths the checker covers, and may not write or delete the paths it protects. For the first example below they are: covered **; protected tests/**.

Check it yourself

Before you submit, run the command from the parameters yourself:

  1. Work in tree/, with your changes applied.
  2. Run command exactly as given (it is an argument array, run without a shell), with networking off if your environment allows it. The checker gives it no network and stops it after timeout_s seconds.
  3. It must exit with status 0.

The runner provides Debian with Node.js and Python 3 with pytest, numpy and pandas, and nothing else: anything your code needs must be in the tree. You may not change any file matching protected; a submission that writes or deletes one is refused.

Examples

Expert-verified examples, each with the result the checker must give.

Examples and their expected results
ExampleExpectedWhy
Implement slugify so the tests passPassesAll three tests pass.
Implement mean and medianPassesRun from pkg/, the tests import stats and pass.
Implement toRomanPassesThe table includes the subtractive pairs, so 4, 9 and 1994 come out right.
Rotate points about the originPassesThe standard rotation matrix, using numpy from the runner image.
Merge overlapping intervalsPassesTouching intervals merge because the comparison is <=.
Implement slugify so the tests passFailsWords are joined with underscores, so two tests fail.
Implement mean and medianFailsA missing colon: the module does not import, so collection fails.
Count Collatz stepsFailsn never falls below 2, so the loop never ends and the command is stopped at the timeout.
Report the HTTP status of a pageFailsThe runner has no network, so the request raises and the test fails.
Implement toRomanFailsWithout subtractive pairs, 4 comes out as IIII.
Rotate points about the originFailsThe signs of the sine terms are swapped, so the point turns clockwise.

Provenance and use

Known limitations

  • The verdict is the exit status alone. Tests that pass vacuously, or a command that runs no tests, still pass.
  • The runner image is fixed: code that needs other packages or network access fails.

The platform reviewer’s audit record

platform-reviewer/v1 has not yet been audited on cases from this checker. Reviewer audits