Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

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>
    sys.exit(hy_main())
  File "/home/chrism/.pyenv/versions/3.5.5/lib/python3.5/runpy.py", line 263, in run_path
    pkg_name=pkg_name, script_name=fname)
  File "/home/chrism/.pyenv/versions/3.5.5/lib/python3.5/runpy.py", 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/runpy.py", 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)))
AssertionError

Project details


Release history Release notifications

This version

0.1

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 hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page