{"id":39546886,"url":"https://github.com/carpentries-incubator/byte-sized-rse-testing","last_synced_at":"2026-01-18T06:47:09.195Z","repository":{"id":320380094,"uuid":"1081874360","full_name":"carpentries-incubator/byte-sized-rse-testing","owner":"carpentries-incubator","description":"Byte-Sized RSE: Unit Testing Code","archived":false,"fork":false,"pushed_at":"2025-12-30T01:43:20.000Z","size":7644,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-02T10:17:21.310Z","etag":null,"topics":["alpha","byte-sized-rse","carpentries-incubator","english","lesson","python","testing","unit-testing"],"latest_commit_sha":null,"homepage":"https://carpentries-incubator.github.io/byte-sized-rse-testing/","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/carpentries-incubator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["carpentries"],"custom":["https://give.communityin.org/TheCarpentries"]}},"created_at":"2025-10-23T12:16:29.000Z","updated_at":"2025-11-19T13:30:12.000Z","dependencies_parsed_at":"2025-10-23T14:29:57.535Z","dependency_job_id":"bf6e2a41-2f6a-4229-8a9b-45a06a1d0b5f","html_url":"https://github.com/carpentries-incubator/byte-sized-rse-testing","commit_stats":null,"previous_names":["carpentries-incubator/byte-sized-rse-testing"],"tags_count":0,"template":false,"template_full_name":"carpentries/workbench-template-md","purl":"pkg:github/carpentries-incubator/byte-sized-rse-testing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carpentries-incubator%2Fbyte-sized-rse-testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carpentries-incubator%2Fbyte-sized-rse-testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carpentries-incubator%2Fbyte-sized-rse-testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carpentries-incubator%2Fbyte-sized-rse-testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carpentries-incubator","download_url":"https://codeload.github.com/carpentries-incubator/byte-sized-rse-testing/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carpentries-incubator%2Fbyte-sized-rse-testing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28531998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"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":["alpha","byte-sized-rse","carpentries-incubator","english","lesson","python","testing","unit-testing"],"created_at":"2026-01-18T06:47:09.093Z","updated_at":"2026-01-18T06:47:09.176Z","avatar_url":"https://github.com/carpentries-incubator.png","language":"Dockerfile","funding_links":["https://github.com/sponsors/carpentries","https://give.communityin.org/TheCarpentries"],"categories":[],"sub_categories":[],"readme":"## Byte-Sized RSE: Unit Testing Code\n\nThis is a Byte-Sized RSE lesson on unit testing code, part of the [Byte-Sized RSE Series](https://github.com/carpentries-incubator/byte-sized-rse-overview/tree/main).\n\n### Questions\n\n- What is a unit test, and why is it important for improving the reliability and reproducibility of research code?\n- How can we identify which parts of code should be tested?\n- How do we write and run a simple unit test for a given function?\n- How can we test that code handles errors or invalid inputs correctly?\n- What makes a good, maintainable unit test?\n\n### Learning Objectives\n\nAt the end of this lesson, learners should be able to:\n\n- Describe what unit testing is and explain why it matters for software quality.\n- Examine example code and identify where and how unit tests could be applied.\n- Write a simple unit test for a function and integrate it into their project.\n- Recognise common error/exception conditions in code and write tests that handle/expect such errors.\n- Evaluate a test suite in terms of coverage.\n\n### Slides\n\n[Slides](https://docs.google.com/presentation/d/1qNyDV3VDwv6Z3RHwfn5hL0pFxzK_DsWN3bPMjwV7Uoc/edit?usp=sharing) available under CC BY 4.0 licence.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarpentries-incubator%2Fbyte-sized-rse-testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarpentries-incubator%2Fbyte-sized-rse-testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarpentries-incubator%2Fbyte-sized-rse-testing/lists"}