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>
    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 | RSS feed

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.

Source Distribution

hytmf-0.1.tar.gz (1.3 kB view details)

Uploaded Source

File details

Details for the file hytmf-0.1.tar.gz.

File metadata

  • Download URL: hytmf-0.1.tar.gz
  • Upload date:
  • Size: 1.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.15.0 CPython/2.7.6

File hashes

Hashes for hytmf-0.1.tar.gz
Algorithm Hash digest
SHA256 1cc49674a07ce5af17c1dffa6112f8d0d627417c9dd58f969e28f8ef6e92bf43
MD5 249e3541194d2c3b55e9639132499053
BLAKE2b-256 7c8e5f9af151df20dc1b7edbd51593fa69a334097791ccfdeb8a87029241c903

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page