{"id":16444918,"url":"https://github.com/jaymon/pyt","last_synced_at":"2025-03-21T05:30:33.326Z","repository":{"id":62583912,"uuid":"10114292","full_name":"Jaymon/pyt","owner":"Jaymon","description":"Easily run python unittests","archived":false,"fork":false,"pushed_at":"2025-02-17T23:22:47.000Z","size":271,"stargazers_count":1,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T21:43:33.638Z","etag":null,"topics":["commandline","python","python-unittest"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jaymon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-05-17T02:00:07.000Z","updated_at":"2025-02-17T23:22:50.000Z","dependencies_parsed_at":"2024-05-02T22:42:27.329Z","dependency_job_id":"1e0852c0-778f-4075-847d-b48b19ef0e30","html_url":"https://github.com/Jaymon/pyt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaymon%2Fpyt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaymon%2Fpyt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaymon%2Fpyt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jaymon%2Fpyt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jaymon","download_url":"https://codeload.github.com/Jaymon/pyt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244745628,"owners_count":20503042,"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","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":["commandline","python","python-unittest"],"created_at":"2024-10-11T09:42:37.125Z","updated_at":"2025-03-21T05:30:33.309Z","avatar_url":"https://github.com/Jaymon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pyt \n\nPyt is a lightweight wrapper around [Python's unittest module](https://docs.python.org/3/library/unittest.html) that adds some nice features and enhancements over the stock `unittest` module.\n\n\n### Quickstart\n\nPyt overrides unittest's built-in pathfinding to be smarter and less verbose, so you can match tests using prefix matching which makes running a test like:\n\n\t$ python -m unittest tests.foo_test.BarTestCase.test_che\n\t\nas simple as:\n\n\t$ pyt foo.Bar.che\n\t\nBut it's even less verbose if you want it to be, pyt can reach into the modules and classes to do its matching, so you don't even need to specify the module and class if you don't want to:\n\n\t$ pyt che\n\n\n#### More examples\n\nTo run all the `Happy` tests:\n\n    $ pyt Happy\n\nTo run all the `newmodule` tests:\n\n    $ pyt newmodule\n\nTo run more than one test:\n\n    $ pyt test1 test2 ...\n\nTo run every test `pyt` can find:\n\n    $ pyt\n\nAnd the way I like to run all tests in the current directory:\n\n    $ pyt -vb\n    \nWhich can also be written:\n\n\t$ pyt --verbose --buffer\n\n\n### Flags\n\nTo see everything pyt can do\n\n    $ pyt --help\n    \n#### --warnings\n\nThis will convert warnings into errors.\n\n\t$ pyt --warnings\n\t\n#### --rerun\n\nIf your last testrun had failing tests this will rerun only the tests that failed.\n\n\t$pyt --rerun\n\n\n### Things to be aware of\n\n#### pyt uses Python's PEP 8 style conventions\n\n`pyt` uses [Python's code styling conventions](http://www.python.org/dev/peps/pep-0008/) to decide what is the module and class, so, given input like this:\n\n    $ pyt foo.bar.Baz.che\n\n`pyt` will consider `foo.bar` to be the module, `Baz` to be a class (because it starts with a capital letter), and `che` to be a method (since it comes after the class).\n\nLikewise, `pyt` uses unittest conventions, so a test module should end with `_test` (eg, `foo.bar_test`) or start with test (eg, `test_foo.py`) and a TestCase class should extend `unittest.TestCase`, and test methods should start with `test_` (eg, `test_che`).\n\n\n#### Vague input can cause pyt to run more tests than you expect\n\nSo if you have something like this:\n\n    project/\n      __init__.py\n      user.py\n      foo/\n        __init__.py\n        user.py\n      tests/\n        __init__.py\n        user_test.py\n        foo/\n          __init__.py\n          user_test.py\n\nAnd you want to run tests for `foo.user` and you run:\n\n    $ pyt user\n\nit will run both `tests/user_test` and `tests.foo.user_test`, the solution is to just be more verbose when you have to be:\n\n    $ pyt foo.user\n\n\n#### Environment Variables\n\nIf you are running the tests within pyt, you might notice there is an environment variable `PYT_TEST_COUNT` that contains the count of how many tests pyt found to run.\n\n\n## Installation\n\nUse `pip`:\n\n    $ pip install pyt\n\nYou can also get it directly from the repo:\n\n    $ pip install --upgrade git+https://github.com/Jaymon/pyt#egg=pyt\n\n\n## Testing\n\nTesting on MacOS:\n\n    $ python -m unittest discover\n\nOr, if you're really brave, you can use `pyt` to test itself:\n\n    $ python -m pyt tests -df\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaymon%2Fpyt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaymon%2Fpyt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaymon%2Fpyt/lists"}