{"id":26608334,"url":"https://github.com/zh217/py-pgtest","last_synced_at":"2025-04-09T22:10:38.218Z","repository":{"id":62582460,"uuid":"156172604","full_name":"zh217/py-pgtest","owner":"zh217","description":"Making postgresql unit-testing less painful","archived":false,"fork":false,"pushed_at":"2018-11-24T04:49:38.000Z","size":30,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-23T23:52:08.375Z","etag":null,"topics":["postgresql","python","unit-testing"],"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/zh217.png","metadata":{"files":{"readme":"README.md","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":"2018-11-05T06:45:42.000Z","updated_at":"2018-11-24T04:49:40.000Z","dependencies_parsed_at":"2022-11-03T22:01:49.565Z","dependency_job_id":null,"html_url":"https://github.com/zh217/py-pgtest","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/zh217%2Fpy-pgtest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zh217%2Fpy-pgtest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zh217%2Fpy-pgtest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zh217%2Fpy-pgtest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zh217","download_url":"https://codeload.github.com/zh217/py-pgtest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119294,"owners_count":21050755,"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":["postgresql","python","unit-testing"],"created_at":"2025-03-23T23:52:22.841Z","updated_at":"2025-04-09T22:10:38.196Z","avatar_url":"https://github.com/zh217.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# py-pgtest\n\nA primitive script to make running postgresql unit-tests less painful.\n\nRequires postgresql server, pgtap and python (\u003e=3.6) installed.\n\nAfter installation with \n```bash\npip install py-pgtest\n```\nyou can go into a directory and run\n```bash\npgtest --pg-uri postgres://user:password@host:port/database\n```\nand the system will:\n* first run `__nuke__.sql` in the current directory using psql, \n* then run `__init__.sql` in the current directory to do the db initialization (hint: you can\nuse `\\ir` in your script to achieve some structure),\n* finally run all `test_*.sql` files found in the subdirectories.\n\nThe tests should be written in [pgtap](https://pgtap.org/) style, and the test results\nwill be displayed using python's unittest style.\n\nIf the argument `--watch` is given, pgtest will watch changes to any\n`.sql` files, and rerun the tests when changes occur.\n\nThere are other options that you can use, e.g. choosing directories other than\nthe current one. For details, run `pgtest -h`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzh217%2Fpy-pgtest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzh217%2Fpy-pgtest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzh217%2Fpy-pgtest/lists"}