python tests for Hadassah Academic Collage intro2cs courses
Project description
inferno tests
This project is an automation for teats for the Hadassah Academic College courses
Intro2cs and Intro2cs2
The tests will:
- Checks the differences between your output and the school solution output
- Checks the differences between your errors (cerr) and the school solution errors
- Checks for leak memory using valgrind
How to Install
Virtual Machine
Because the virtual machine has internet connection you may only use the following terminal command
$ python -m pip install --user hac-intro2cs-tests
NoMachine
the NoMachine has no internet connection so you must download the file from PyPI page
Now add the file to the NoMachine and run the following command:
command
$ python -m pip install --user <file_name>
replace the <file_name>
with the name of the file you downloaded
How to Use
-
Open the linux (NoMachine or Virtual Machine) and make directory with the following files:
- School solution file with the extension "sol",
must be the only file with "sol" in the name of the file - your executable file must be the same name of the the school solution file without the "sol"
- tests files with "_test" in the name
For example, directory with the following files:
ex1asol
ex1a
ex1a_test00.in
ex1a_test01.in
ex1a_test02.in
(The directory may also contain the file
ex1a.cc
for easy use) - School solution file with the extension "sol",
-
Open the terminal at the directory and write the following command:
python -m test_ex
For each test the program will print the name of the test and the problem in the test (is there output diff, is there errors (cerr) diff, is there a leak memory).
the tests automatically run with timeout of 5 seconds to your program.
to run the program with X seconds timeout, run the following commandtest_ex --timeout X
To run with no timeout (Strongly recommended not to), set the timeout flag to 0:
test_ex --timeout 0
For more information run:
test_ex --help
Alias
you can add alisa to the command by writing the next line to the file ~/.tcshrc
:
alias test_ex python -m test_ex
you may run the following command to do so:
$ echo "alias test_ex python -m test_ex" >> ~/.tcshrc
now you can run the command:
$ test_ex
instead of
$ python -m test_ex
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for hac_intro2cs_tests-1.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66db04c2fa4363dc452cb6546680369e3a744ddf456025bf288354fd37bd3d07 |
|
MD5 | e7b90112eb26a2710df37a155b9bb40d |
|
BLAKE2b-256 | 71c8d96a66bad33359e89e589418ce147ad1789810ec8041e140904bccc12338 |