{"id":17800910,"url":"https://github.com/refi64/hytest","last_synced_at":"2025-08-10T22:06:31.330Z","repository":{"id":20173951,"uuid":"23444807","full_name":"refi64/hytest","owner":"refi64","description":"The first (and only) Hy unit testing framework","archived":false,"fork":false,"pushed_at":"2017-03-10T10:06:21.000Z","size":42,"stargazers_count":30,"open_issues_count":2,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-08-09T01:42:21.921Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Hy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"boltdb/bolt","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/refi64.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-28T22:18:14.000Z","updated_at":"2025-07-20T12:54:21.000Z","dependencies_parsed_at":"2022-08-07T09:15:55.093Z","dependency_job_id":null,"html_url":"https://github.com/refi64/hytest","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/refi64/hytest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fhytest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fhytest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fhytest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fhytest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/refi64","download_url":"https://codeload.github.com/refi64/hytest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fhytest/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269794097,"owners_count":24476743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-27T12:32:34.181Z","updated_at":"2025-08-10T22:06:31.309Z","avatar_url":"https://github.com/refi64.png","language":"Hy","funding_links":[],"categories":[],"sub_categories":[],"readme":"HyTest\n======\n\n.. image:: https://travis-ci.org/kirbyfan64/hytest.png\n    :target: https://travis-ci.org/kirbyfan64/hytest\n\nHyTest is a really cool unit testing framework for `Hy \u003chttp://docs.hylang.org/\u003e`_ (think Python+Lisp). Actually, as far as I know, it's the *only* unit testing framework for Hy. Here's an example:\n\n.. code:: clojure\n\n   (require hytest [*]) ; load HyTest\n\n   (test-set abc ; define a test set, similar to a unittest test case\n     (test-setup ; test setup\n       (def x 0)\n       (def y 1)\n       (def z nil))\n     (test-teardown ; test teardown; executed regardless of whether or not test failed\n       ; nothing to see here!\n     )\n     (test = 1 1) ; test for equality\n     (test == 1 1) ; same as =\n     (test eq 1 1) ; again, same as =\n     (test != 1 0) ; test for inequality\n     (test ne 1 0) ; same as !=\n     (test \u003c 0 1) ; test for less-than\n     (test lt 0 1) ; same as \u003c\n     (test \u003e 1 0) ; test for greater-than\n     (test gt 1 0) ; same as \u003e\n     (test \u003e= 1 1) ; greater-than-or-equal-to\n     (test gte 1 1) ; same as \u003e=\n     (test \u003c= 1 1) ; less-than-or-equal-to\n     (test lte 1 1) ; same as \u003c=\n     (test is x x) ; test for identity; sort of like assert x is x\n     (test is-not x y) ; test for identity inequality; sort of like assert x is not y\n     (test is-nil z) ; test to see if equal-to None/nil\n     (test is-not-nil x) ; opposite of is-nil\n     (test is-none z) ; same as is-nil\n     (test is-not-none x) ; same as is-not-nil\n     (test ~ 0 0.00000001) ; test for almost equal(like unittest's assertAlmostEqual)\n     (test aeq 0 0.00000001) ; same as ~\n     (test !~ 0 1) ; test for not almost equal(like unittest's assertNotAlmostEqual)\n     (test ane 0 1); same as !~\n     (test =~ \"abc\" \"b\") ; test to see if \"abc\" matches regex \"b\"\n     (test re \"abc\" \"b\") ; same as =~\n     (test !=~ \"abc\" \"d\") ; opposite of =~\n     (test not-re \"abc\" \"d\") ; same as !=~\n     (test =: [1 2 3] [3 1 2]) ; test to see if both items are equal when sorted\n     (test ieq [1 2 3] [3 1 2]) ; same as =:\n     (test !=: [1 2 3] [3 1]) ; opposite of =:\n     (test ine [1 2 3] [3 1]) ; same as !=:\n     (test true 1) ; test to see if 1 is truthy(so that (bool 1) is true)\n     (test True 1) ; same as true\n     (test false 0) ; test to see if 0 is falsy(so that (bool 0) is false)\n     (test False 0) ; same as false\n     (test not 0) ; same as false\n     (test in 1 [1 2 3]) ; test for membership\n     (test not-in 1 [2 3]) ; opposite of in\n     (test raises (assert false)) ; test that the code that follows raises an exception\n     (test not-raises (assert true)) ; opposite of raises\n     (test raises-exc [AssertionError] (assert false)) ; test that the code that follows raises one of the exceptions in the list\n     (test not-raises-exc [AssertionError] (assert true)) ; test that one of the given exceptions is NOT raised by the code that follows\n     (test raises-msg \"abc\" (raise (ValueError \"abc\"))) ; test that the code that follows raises an exception whose message matches the regex \"abc\"\n     (test not-raises-msg \"abc\" (raise (ValueError \"ab\")))) ; opposite of raises-msg\n\n   (test-set xyz\n     (if true\n       (skip-test \"Reason for skipping here\"))) ; skip-test skips the current test\n\n   (test-set-fails fls ; test-set-fails defines a test set that *should* fail\n     (test not 1))\n\nTo run the tests, just run::\n\n   $ hytest\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefi64%2Fhytest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frefi64%2Fhytest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefi64%2Fhytest/lists"}