Run pytest and show prints:
$ pytest -v -stest_helloworld.py::TestHello::test_python [TestHello.setUpClass] PASSED
test_helloworld.py::TestHello::test_world PASSED
test_helloworld.py::TestHey::test_world [TestHey.setup_class] PASSED
| from dataclasses import dataclass, field | |
| from typing import List | |
| import pytest | |
| @dataclass(frozen=True) | |
| class Ingredient: | |
| name: str | |
| plant_based: bool |
| category | name | tested | |
|---|---|---|---|
| basic | os | False | |
| bookmarks_sync | failure_reason | False | |
| bookmarks_sync | finished_at | False | |
| bookmarks_sync | incoming | False | |
| bookmarks_sync | outgoing | False | |
| bookmarks_sync | outgoing_batches | False | |
| bookmarks_sync | remote_tree_problems | False | |
| bookmarks_sync | started_at | False | |
| bookmarks_sync | uid | False |
| # Colors from https://github.com/sdras/night-owl-vscode-theme | |
| # Update your GitHub labels with https://github.com/hackebrot/labels | |
| [bug] | |
| color = "ffeb95" | |
| description = "Bugs and problems with labels" | |
| name = "bug" | |
| ["code quality"] | |
| color = "c792ea" |
| diff --git a/build/virtualenv_packages.txt b/build/virtualenv_packages.txt | |
| --- a/build/virtualenv_packages.txt | |
| +++ b/build/virtualenv_packages.txt | |
| @@ -77,4 +77,5 @@ mozilla.pth:third_party/python/pyasn1 | |
| mozilla.pth:third_party/python/pyasn1-modules | |
| mozilla.pth:third_party/python/rsa | |
| mozilla.pth:third_party/python/PyECC | |
| +mozilla.pth:toolkit/components/telemetry/tests/marionette/harness | |
| optional:packages.txt:comm/build/virtualenv_packages.txt | |
| diff --git a/testing/marionette/mach_commands.py b/testing/marionette/mach_commands.py |
Run pytest and show prints:
$ pytest -v -stest_helloworld.py::TestHello::test_python [TestHello.setUpClass] PASSED
test_helloworld.py::TestHello::test_world PASSED
test_helloworld.py::TestHey::test_world [TestHey.setup_class] PASSED
| .DEFAULT_GOAL := help | |
| define filterstdlib | |
| go list -f '{{ if not .Standard }}{{ .ImportPath }}{{ end }}' | |
| endef | |
| define getimports | |
| go list -f '{{ join .Imports "\n" }}' | |
| endef |
| addprx = "!f() { b=`git symbolic-ref -q --short HEAD` && \ | |
| echo \"Making branch for pull request #$1 [pr/$1]\" && \ | |
| git fetch origin pull/$1/head:pr/$1 && \ | |
| echo \"Rebasing pr/$1 onto $b...\" && \ | |
| git fetch -q -f origin pull/$1/merge:refs/PR_MERGE_HEAD && \ | |
| git rebase -q --onto $b PR_MERGE_HEAD^ pr/$1 && \ | |
| git checkout -q $b && echo && \ | |
| git diff --stat $b..pr/$1 && echo && \ | |
| git log --oneline $b..pr/$1; \ | |
| git update-ref -d refs/PR_MERGE_HEAD; \ |
| @pytest.hookimpl(hookwrapper=True) | |
| def pytest_runtest_makereport(item, call): | |
| outcome = yield | |
| rep = outcome.get_result() | |
| if pytest.config.getoption('--error-for-skips'): | |
| if rep.skipped and call.excinfo.errisinstance(pytest.skip.Exception): | |
| rep.outcome = 'failed' | |
| r = call.excinfo._getreprcrash() | |
| rep.longrepr = 'Skipped test - {message}'.format(message=r.message) |
| elif call.when == "call": | |
| strict_default = item.config.getini('xfail_strict') | |
| is_strict_xfail = evalxfail.get('strict', strict_default) | |
| # TODO: xpass outcome | |
| if is_strict_xfail: | |
| rep.outcome = "failed" | |
| else: | |
| rep.outcome = "passed" | |
| rep.wasxfail = evalxfail.getexplanation() |
| # -*- coding: utf-8 -*- | |
| import random | |
| import pytest | |
| @pytest.hookimpl(hookwrapper=True) | |
| def pytest_runtest_makereport(item): | |
| outcome = yield | |
| rep = outcome.get_result() |