{"id":20456562,"url":"https://github.com/krassowski/anki_testing","last_synced_at":"2025-04-13T04:05:43.188Z","repository":{"id":93476359,"uuid":"106926484","full_name":"krassowski/anki_testing","owner":"krassowski","description":"A small utility for testing Anki 2.1 addons ","archived":false,"fork":false,"pushed_at":"2020-06-15T13:26:11.000Z","size":32,"stargazers_count":12,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T04:05:29.457Z","etag":null,"topics":["anki","anki-addon","anki-testing","continuous-integration","test-automation","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krassowski.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":"2017-10-14T12:36:05.000Z","updated_at":"2025-01-18T12:19:13.000Z","dependencies_parsed_at":"2023-03-24T03:04:45.295Z","dependency_job_id":null,"html_url":"https://github.com/krassowski/anki_testing","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/krassowski%2Fanki_testing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krassowski%2Fanki_testing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krassowski%2Fanki_testing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krassowski%2Fanki_testing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krassowski","download_url":"https://codeload.github.com/krassowski/anki_testing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248661707,"owners_count":21141450,"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":["anki","anki-addon","anki-testing","continuous-integration","test-automation","testing"],"created_at":"2024-11-15T11:23:06.223Z","updated_at":"2025-04-13T04:05:43.155Z","avatar_url":"https://github.com/krassowski.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Easy testing of Anki add-ons\n\n[![Build Status](https://travis-ci.org/krassowski/anki_testing.svg?branch=master)](https://travis-ci.org/krassowski/anki_testing)\n\nA small utility for testing Anki 2.1 add-ons.\nThe code from this repository is used by [Anki-Night-Mode](https://github.com/krassowski/Anki-Night-Mode) and [AwesomeTTS](https://github.com/AwesomeTTS/awesometts-anki-addon).\n\n### Usage\n\n1. (Optional) add following to you .gitignore:\n```\nanki_root\nanki_testing\n```\n\n2. Clone this repository into the root of your add-on repo:\n\n```bash\ngit clone https://github.com/krassowski/anki_testing\n```\n\n2. In your tests add:\n```python\nfrom anki_testing import anki_running\n\ndef test_my_addon():\n    with anki_running() as anki_app:\n        import my_addon\n        # add some tests in here\n```\n\n3. Create a testing script which will install Anki and then call your test-runner. For example:\n\n```bash\n#!/usr/bin/env bash\nbash anki_testing/install_anki.sh\npython3 -m pytest tests\n```\n\nLets call the file above `run_tests.sh`.\n\n4. (Optional) configure `.travis.yml` using following template:\n\n```yml\nlanguage: python\nsudo: required\n\npython:\n  - 3.6\n\ninstall: \n  - git clone https://github.com/krassowski/anki_testing\n  - source anki_testing/setup.sh \n\nscript:\n  - bash run_tests.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrassowski%2Fanki_testing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrassowski%2Fanki_testing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrassowski%2Fanki_testing/lists"}