Simple package to run unit test for network automation python3 code.
Explanation by examples:
INPUT can be either a file or a return str() or list() Usually is the output of a show command
input = open('../fixtures/ssh_input', 'r')
HAVE is the return of you code run on top of INPUT
have = open('../fixtures/have', 'r')
WANT must be a file where you have your expected output
want = open('../fixtures/want', 'r')
Create an instance of NaTest
my_test = NaTest()
print the input. Ideally the input is saved in a variable and use to run your code (instead of run real ssh commands)
print(my_test.read(input))
print diff between what we HAVE and what we WANT
print(my_test.result(want, have))
Result (compared WANT against HAVE after running code using INPUT):
['+ This is an extra line\n']
['- This is a missing line\n']
Metadata
Release files for natest 0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| natest-0.9-py3-none-any.whl | Python 3 | none | any | Details for natest-0.9-py3-none-any.whl |
Release files / natest-0.9-py3-none-any.whl
| Download URL | natest-0.9-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
261f8acbcf0391221398736b2d77730130af2a56b939a97a96925c73f3bbcd7e
|
|
BLAKE2b-256 checksum How to use checksums |
9d7e742f823104ca3289879c6439e451e66e48706f3647e5bcd2136e804a13d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.0
|
Security for natest 0.9
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.