{"id":16507761,"url":"https://github.com/noahgift/pytest-from-ground-zero","last_synced_at":"2025-06-17T08:06:57.673Z","repository":{"id":141812840,"uuid":"491504419","full_name":"noahgift/pytest-from-ground-zero","owner":"noahgift","description":"This is a new pytest repo that covers the best practices","archived":false,"fork":false,"pushed_at":"2022-05-12T21:03:34.000Z","size":32,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-08T14:25:14.657Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/noahgift.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-12T12:28:07.000Z","updated_at":"2024-07-10T17:10:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"0af44b82-c8af-4b5b-a412-bf0e44b1b423","html_url":"https://github.com/noahgift/pytest-from-ground-zero","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/noahgift/pytest-from-ground-zero","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noahgift%2Fpytest-from-ground-zero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noahgift%2Fpytest-from-ground-zero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noahgift%2Fpytest-from-ground-zero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noahgift%2Fpytest-from-ground-zero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noahgift","download_url":"https://codeload.github.com/noahgift/pytest-from-ground-zero/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noahgift%2Fpytest-from-ground-zero/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260318706,"owners_count":22991120,"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":[],"created_at":"2024-10-11T15:30:22.502Z","updated_at":"2025-06-17T08:06:57.630Z","avatar_url":"https://github.com/noahgift.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build](https://github.com/noahgift/pytest-from-ground-zero/actions/workflows/build.yml/badge.svg)](https://github.com/noahgift/pytest-from-ground-zero/actions/workflows/build.yml)\n[![Build2](https://codebuild.us-east-1.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiZGhyL002azVxblZhdDFUOXM3ZHlYSmdYQ2xobnl2Unh6TTNOOG96bVEzYXN3ZXQ4TFhvSzN3bDcrWVR4b1FVSTJseFltWWhlbk9DTzAycE1VT0Mrbnk4PSIsIml2UGFyYW1ldGVyU3BlYyI6IkJ1VG9FMGJjUGx2K29wSi8iLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D\u0026branch=main)\n# pytest-from-ground-zero\nThis is a new pytest repo that covers the best practices\n\n## Note on Virtualenv\nCheckout how if you run `pip freeze | wc -l` there are many package you may not want\nTry `which python`\n\n1. `virtualenv ~/.venv`\n2. `vim ~/.bashrc` and put in `source ~/.venv/bin/activate`\n3.  Verify the right python `which python` and try `pip freeze | wc -l`\n\n## Testing for Multi-Cloud\n\n* AWS Cloud Shell\n\n## Using PyTest\n\n* Use library style:  `python -m pytest -vv --cov=mylib testing/`\n* Run tests by keyword expressions: `python -m pytest -vv -k \"search\"`\n* To run a specific test within a module: `python -m pytest -vv testing/test_fruity.py::test_random_fruit`\n* Run tests by marker expressions: https://docs.pytest.org/en/7.1.x/how-to/mark.html#mark\n* Profile tests: `pytest --durations=10 --durations-min=1.0`\n* Skipping `@pytest.mark.skip(reason=\"no way of currently testing this\")`\n* [Checkout Fixtures here](https://paiml.com/docs/home/books/testing-in-python/chapter07-pytest-fixtures/)\n\n### Distributed Testing \n\n* install: https://pypi.org/project/pytest-xdist/#installation\n![Drawing-8 sketchpad](https://user-images.githubusercontent.com/58792/168116462-09d64935-9862-4e3a-9d87-5c160f9f66eb.jpeg)\n\n### AWS Code Build\n\n* Easy because we leveraged `makefile`:  [buildspec.yml](https://github.com/noahgift/pytest-from-ground-zero/blob/main/buildspec.yml)\n\n### References\n\n* [Watch on O'Reilly: Cloud Native Pytest Tips and Tricks from Ground Zero](https://learning.oreilly.com/videos/cloud-native-pytest/05122022VIDEOPAIML/)\n* [Watch on YouTube: Cloud Native Pytest Tips and Tricks from Ground Zero ](https://www.youtube.com/watch?v=EOCtbjuICbA)\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoahgift%2Fpytest-from-ground-zero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoahgift%2Fpytest-from-ground-zero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoahgift%2Fpytest-from-ground-zero/lists"}