Skip to main content

Micro-testing framework for Hy.

Project description

This is a testing micro-framework for Hy.

To use it, wrap every assert in the test-case macro call like this:

(require [hytest [test-case]])

(test-case (assert (= True True)))
(test-case (assert (= False True)))

When you run the tests you will see the source code of each test and a pass/fail indicator like this:

$ hy testtest.hy
Test:   (assert (= True True))
Pass:   ✔
Test:   (assert (= False True))
Traceback (most recent call last):
  File "/home/chrism/dev/hytmf/virtualenv/bin/hy", line 10, in <module>
  File "/home/chrism/.pyenv/versions/3.5.5/lib/python3.5/", line 263, in run_path
    pkg_name=pkg_name, script_name=fname)
  File "/home/chrism/.pyenv/versions/3.5.5/lib/python3.5/", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/home/chrism/.pyenv/versions/3.5.5/lib/python3.5/", line 85, in _run_code
    exec(code, run_globals)
  File "/home/chrism/dev/hytmf/testtest.hy", line 5, in <module>
    (test-case (assert (= False True)))

Project details

Release history Release notifications | RSS feed

This version


Download files

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

Files for hytmf, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size hytmf-0.1.tar.gz (1.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page