CISC108 Support Library
A collection of tools to help students write code.
For now, mostly improved assertions.
Installation
Install from PyPi:
pip install cisc108
Or install from the https://github.com/UD-CIS-Teaching/cisc108-python-support-library
Examples
from cisc108 import assert_equal
def halve(number):
return number / 2
# Correctly handles floating points
assert_equal(halve(10), 5.0)
Output
This library will print a message to STDOUT if an assertion fails, and returns True/False. It does not raise an exception or print to STDERR.
Supported Types
Numbers: strictly compares numeric types, but allows floats to have imprecision, defaults to 4 places
Strings: can strictly compare types with exact_strings=True, but defaults to ignore whitespace on newlines and capitalization
Lists, Tuples: applies same rules to inner types as container types
Sets, Frozensets, Dictionary: checks that all elements are contained in both, in any order
Generators: functions like enumerate and .items() that produce generators are converted to lists and sets (as appropriate), then checked that their values match.
Other types should work as well, but require that the result of type match, and that x == y
Metadata
Release files for CISC108 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| CISC108-0.4.tar.gz | 6.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| CISC108-0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.6 kB
Release files / CISC108-0.4.tar.gz
| Download URL | CISC108-0.4.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f449ece972795417da94d33560d0ed9183c7fa23d9319e3ea1726283cd565a0f
|
|
BLAKE2b-256 checksum How to use checksums |
3faa5be83cee1a059e5d311e892e69f83878328a80c9f9bf17d152aa08904e4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Release files / CISC108-0.4-py3-none-any.whl
| Download URL | CISC108-0.4-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3014eca3050e78cda837e50b60ed37f7b090feb96028989b6a6d665a963f1ee7
|
|
BLAKE2b-256 checksum How to use checksums |
fc7388e145b49ced6bd91a45cf7ab1120326bfb166c5cf860b5fde4a84c6b0da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
|
Security for CISC108 0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.