-
Notifications
You must be signed in to change notification settings - Fork 42
Students
To use OK, make sure you have the following in your current directory:
- A published copy of OK. This file is actually a ZIP archive, but make sure not to unzip it.
- A configuration file called
config.json
. Make sure you've downloaded the correctconfig.json
for your assignment. - Any other files necessary for your assignment.
All of these files should be provided to you by your instructor.
The easiest way to use OK is with the following command:
python3 ok
This will run all the tests specified in config.json
. At the end, OK will ask you to authenticate -- this is to allow OK to backup your files to the OK website. You will only need to authenticate once per assignment.
If you want to test a particular question, you can use the -q
option:
python3 ok -q name_of_test
If your instructor has activated the Unlocking feature, you can enter an unlocking session with the -u
option:
python3 ok -q name_of_test -u
If you want a way to interact with an unsuccessful test, you can use the -i
option:
python3 ok -q name_of_test -i
After the test's error is printed, an interactive session is opened.
By default, tests that pass are omitted from the output. This is to avoid clutter and make it easier to spot tests that fail. If you want to see output for all tests, including successful ones, use the -v
option:
python3 ok -v
To submit your assignment, use the --submit
option:
python3 ok --submit
By default, OK will attempt to send a backup of your files and a record of your test progress to a server. If you wish to prevent any data from being sent, use the --local
option:
python3 ok --local