Functional tests for teaching activities
Project description
Baygon
Kills Bugs Dead!
This package is a minimalist functional test suite for binaries. It relies on a description of tests usually in test.yml or test.json.
The documentation is available here.
Test file format
It can be either a .yml or a .json file.
version: 1
tests:
- name: Arguments check
tests:
- name: No errors if two arguments
args: [1, 2]
exit: 0
- name: Error if less than two arguments
args: [1]
exit: 1
- name: Stdout is the sum of arguments
args: [1, 2]
stdout: []
- name: Version on stderr
args: ['--version']
stderr:
- regex: '\b\d\.\d\.\d\b'
- contains: 'Version'
Usage
$ info-test -v ./a.out
Test 1: Arguments check
Test 1.1: No errors if two arguments................ PASSED
Test 1.2: Error if less than two arguments.......... PASSED
Test 2: Stdout is the sum of arguments.................. PASSED
Test 3: Version on stderr............................... PASSED
Ran 4 tests in 0.0s.
ok.
How to install?
pip3 install baygon
Build documentation
The documentation is build upon VuePress.
cd docs
yarn install
yarn docs:build
yarn docs:dev
Contributing ?
sudo apt update python-venv
git clone https://github.com/heig-tin-info/baygon.git
cd baygon
python -m venv env
source env/bin/activate
pip install -e .
Tests
Install pyenv then install all required version of Python:
pyenv install 3.6.15
pyenv install 3.7.12
pyenv install 3.8.12
pyenv install 3.9.9
pyenv install 3.10.4
pyenv install 3.11.0
pyenv install 3.12.0
pyenv global 3.6.15 3.7.12 3.8.12 3.9.9 3.10.4 3.11.0 3.12.0
Then setup your Poetry environment:
poetry install
Run the tests:
poetry run tox
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file baygon-0.6.2.tar.gz.
File metadata
- Download URL: baygon-0.6.2.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cba85558736b951121a956950d78a19f3aa8838e033cc32543e55a6a1e2a8848
|
|
| MD5 |
90789d5535513dc1592b34495dcb7b72
|
|
| BLAKE2b-256 |
dab9fd1b829932b6d0e50468ac903314b6e8d4daaf8023d854ed2810ab47f0e9
|
File details
Details for the file baygon-0.6.2-py3-none-any.whl.
File metadata
- Download URL: baygon-0.6.2-py3-none-any.whl
- Upload date:
- Size: 21.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cf322949eae4add03bca500ba0c60625b64fd82e8b954afe738176e9460d94d
|
|
| MD5 |
90328c42f1accd00d490439600a11fe0
|
|
| BLAKE2b-256 |
a6817a5c978cca576ae879b9a89ecee092334bf26fbc1c8b0510a3d7f3910ff4
|