summaryrefslogtreecommitdiffstats
path: root/ExampleAssessments/example.yml
blob: ec095614a95043ccec36bcd0f0b5e0432416688f (plain)
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
52
53
54
55
56
57
58
59
name: CMP-5021B-19-20
files:
    - example.py:
        classes:
            - Application:
                methods:
                    - __init__(3)
                    - a_method_with_defaults(3)
                    - add(3)
                    - aMethodThatIsntThere(1)
        functions:
            - hello_world(2)
            - an_undocumented_function(0)
            - aFunctionThatIsntThere(2)
            - greet(2)
        tests:
            - |
                dateOne = example.MyDate(day = 12, month = 8, year = 2001)
                dateTwo = example.MyDate(day = 12, month = 8, year = 2001)
                assert dateOne == dateTwo
            - |
                dateOne = example.MyDate(day = 12, month = 8, year = 2001)
                dateTwo = example.MyDate(day = 5, month = 4, year = 1999)
                assert dateOne == dateTwo
        run:
            - python example.py 3:
                regexes:
                    - hello world\!
            - python example.py 1:
                regexes:
                    - hello world\!
                    - True\n\nFalse
    - aFileThatIsntThere.py:
        functions:
            - hello_world(2)
    - animals.py:
        classes:
            - Dog:
            - Cat:
            - Kitten:
        tests:
            - |
                nibbles = animals.Kitten()
                assert nibbles.speak() == "nyaa~~"
            - |
                milton = animals.Dog()
                assert milton.move() == "*moves*"
        run:
            - python animals.py:
                monitor: animals.txt
                regexes:
                    - TURRÓN
                    - meow \(but cuter\)
produced_files:
    - animals.txt
dependencies:
    files:
        - ../wsData.txt
        - ../IncludeDirectory