Skip to main content

This module allows you to easily test simple functions. All errors will be catched and showed to you gracefully.

Note that this module is incredibly basic and does not work with any kind of indented code, so e.g. for loops are not an option.

code examples:

>>> from easyerrors import test
>>> 
>>> @test
>>> def tryout(msg, num):
... 	print(msg, num)
...
>>> tryout('hey', 3)

Testing code inside function 'tryout':

-------- Test started! --------

>>> print(msg, num,)
hey 3


-------- Test ended! --------
>>> from easyerrors import test
>>> 
>>> @test
>>> def tryout(msg, num):
... 	print(msg, num)
... 	print(invalidargument)
...
>>> tryout('hey', 3)

Testing code inside function 'tryout':

-------- Test started! --------

>>> print(msg, num)
hey 3

>>> print(incorrectargument)
Error: name 'incorrectargument' is not defined


-------- Test ended! --------

 Errors found:
  - name 'incorrectargument' is not defined
  

Download files

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

Source Distribution

easyerrors-1.0.0.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file easyerrors-1.0.0.tar.gz.

File metadata

  • Download URL: easyerrors-1.0.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.7.3

File hashes

Hashes for easyerrors-1.0.0.tar.gz
Algorithm Hash digest
SHA256 44da44e754ddd10b06c2837c5c1d0809d43efb5a46635741bd898622d4863c75
MD5 137ed6f0c4863fdd536f296c34274129
BLAKE2b-256 612528ea6efcbc0fe0b11fbf26ee779c1b42b62147bb73674cc06de411cf024b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page