public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
blob cfcc8609fc9eb55ac07e78682189d6e6c318b56a 834 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
 
#! /usr/bin/env avocado-runner-avocado-classless

"""
Example avocado-classless style tests.  Note that some of these
are expected to fail.

"""

import sys

from avocado_classless.test import test, test_output


@test
def trivial_pass():
    print("Passes, trivially")


@test
def trivial_fail():
    print("Fails, trivially", file=sys.stderr)
    assert False


# Some test_output checks
def is_integer(val):
    assert isinstance(val, int)


def is_positive(val):
    assert val > 0


@test_output(is_integer, is_positive)
def positive_integer():
    return 17


@test_output(is_integer, is_positive)
def negative_integer():
    return -17


@test_output(is_integer, is_positive)
def positive_fraction():
    return 3.5


@test_output(is_integer, is_positive)
def negative_fraction():
    return -3.5

debug log:

solving a0e883f3 ...
found a0e883f3 in https://archives.passt.top/passt-dev/20230627025429.2209702-10-david@gibson.dropbear.id.au/
found a4856124 in https://archives.passt.top/passt-dev/20230627025429.2209702-7-david@gibson.dropbear.id.au/
found 3895ee81 in https://archives.passt.top/passt-dev/20230627025429.2209702-5-david@gibson.dropbear.id.au/

applying [1/3] https://archives.passt.top/passt-dev/20230627025429.2209702-5-david@gibson.dropbear.id.au/
diff --git a/test/avocado_classless/examples.py b/test/avocado_classless/examples.py
new file mode 100644
index 00000000..3895ee81


applying [2/3] https://archives.passt.top/passt-dev/20230627025429.2209702-7-david@gibson.dropbear.id.au/
diff --git a/test/avocado_classless/examples.py b/test/avocado_classless/examples.py
index 3895ee81..a4856124 100644


applying [3/3] https://archives.passt.top/passt-dev/20230627025429.2209702-10-david@gibson.dropbear.id.au/
diff --git a/test/avocado_classless/examples.py b/test/avocado_classless/examples.py\r
index a4856124..a0e883f3 100644\r

Checking patch test/avocado_classless/examples.py...
Applied patch test/avocado_classless/examples.py cleanly.
Checking patch test/avocado_classless/examples.py...
Applied patch test/avocado_classless/examples.py cleanly.
Checking patch test/avocado_classless/examples.py...
Applied patch test/avocado_classless/examples.py cleanly.

index at:
100644 cfcc8609fc9eb55ac07e78682189d6e6c318b56a	test/avocado_classless/examples.py

Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).