A package for unittest
Project description
fhm-unittest
A package for unittest. It will take two parameters where the first parameter will be the returned value and the second parameter will be the expected value.
Installation Instructions
Using PIP via PyPI
pip install fhm-unittest
for installing on Google Colab:
! pip3 install fhm-unittest
Usage
>>> import fhm_unittest as unittest
To test a function, call the output_test function as pass your returned value and expected value as parameters
>>> unittest.output_test(returned value, expected value)
Example - 01
def even_odd_checker(number):
if number % 2 == 0:
return 'The number is even'
else:
return 'The number is odd'
>>> unittest.output_test(even_odd_checker(10), 'The number is even')
Accepted
Example - 02
def even_odd_checker(number):
if number % 2 == 0:
return 'even'
else:
return 'odd'
>>> unittest.output_test(even_odd_checker(10), 'The number is even')
Not Accepted [Your output: even | Expected Output: The number is even]
Example - 03
def even_odd_checker(number):
if number % 2 == 0:
return 'even'
else:
return 'odd'
>>> unittest.output_test(even_odd_checker(10), 'The number is odd')
Wrong Answer [Your output: even | Expected Output: The number is odd]
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
fhm_unittest-1.0.1.tar.gz
(2.6 kB
view details)
Built Distribution
File details
Details for the file fhm_unittest-1.0.1.tar.gz
.
File metadata
- Download URL: fhm_unittest-1.0.1.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce6425677cb3d335585a03b9471aee08a1bdb59ee116031762bfc9e67a811333 |
|
MD5 | 59199894ec0dde5584ff244bb8dccb43 |
|
BLAKE2b-256 | c446848f7bca36ed4b65fb7585d29b9b90db1ce09d533c6f406b0ea439da5576 |
File details
Details for the file fhm_unittest-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: fhm_unittest-1.0.1-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3670b7302aaa9e43f9089a4299824d7347dc0fb608c34c8799b9a5554e13ced |
|
MD5 | 80b22d4ddfd127be606be537d162b0c8 |
|
BLAKE2b-256 | c2a6e39854de02d637c7b1bbd8b815ff593383941b5ff41cea29580b3ff1e96c |