Skip to main content

python tests for Hadassah Academic Collage intro2cs courses

Project description

inferno tests

Github licence

Github release Github tag PyPI version

Code style: black

This project is an automation for teats for the Hadassah Academic College courses
Intro2cs and Intro2cs2

The tests will:

  1. Checks the differences between your output and the school solution output
  2. Checks the differences between your errors (cerr) and the school solution errors
  3. 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

  1. 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)

  2. 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 command

    test_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hac-intro2cs-tests-1.2.3.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

hac_intro2cs_tests-1.2.3-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file hac-intro2cs-tests-1.2.3.tar.gz.

File metadata

  • Download URL: hac-intro2cs-tests-1.2.3.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.4

File hashes

Hashes for hac-intro2cs-tests-1.2.3.tar.gz
Algorithm Hash digest
SHA256 4c2b1368b6ee5d96a388bdc90feb801d480982e7fa2d9a436b4519b750023164
MD5 05a9d9df609c8711f9f19c7799a8a182
BLAKE2b-256 9df4f98a46d5a62a7688f2e0160b835f53176a2c39bb6e5dd05e200706f603c8

See more details on using hashes here.

File details

Details for the file hac_intro2cs_tests-1.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for hac_intro2cs_tests-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 66db04c2fa4363dc452cb6546680369e3a744ddf456025bf288354fd37bd3d07
MD5 e7b90112eb26a2710df37a155b9bb40d
BLAKE2b-256 71c8d96a66bad33359e89e589418ce147ad1789810ec8041e140904bccc12338

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page