-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdbwebb2-inspect-oopython.bash
127 lines (93 loc) · 3.08 KB
/
dbwebb2-inspect-oopython.bash
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#---------------------------- INSPECT DBJS START --------------------------
#
# Test general
#
function oopython()
{
inspectIntro
}
#
# Test general, last in sequence
#
function oopythonlast()
{
inspectMe "me/flask" "app.cgi" "" "" "flask"
}
#
# Test kmom
#
function oopythonkmom01()
{
inspectLab "uppgift/python-med-objekt-och-klasser" "lab1" "answer.py" "python3 answer.py"
}
#
# Test kmom
#
function oopythonkmom02()
{
inspectLab "uppgift/python-med-mer-objekt-och-klasser" "lab2" "answer.py" "python3 answer.py"
inspectExerciseHeader "Skapa objekt efter UML-diagram" "uppgift/skapa-objekt-efter-uml" "$KMOM/deck"
fileIsReadable "me/$KMOM/deck/deck.py"
fileIsReadable "me/$KMOM/deck/hand.py"
fileIsReadable "me/$KMOM/deck/card.py"
inspectCommand "main.py" "$THEDIR/me/$KMOM/deck" "python3 main.py"
inspectExerciseHeader "Testfall för din kortlek" "uppgift/skriv-testfall-for-ett-objekt" "$KMOM/test"
viewFileContent "test_deck.py" "me/$KMOM/test"
inspectCommand "test_deck.py" "$THEDIR/me/$KMOM/test" "python3 test_deck.py"
inspectExerciseHeader "Sequence diagram" "uppgift/skapa-sequence-diagram" "$KMOM/uml"
printUrl "sequenceDiagram.png" "me/$KMOM/uml"
}
#
# Test kmom
#
function oopythonkmom03()
{
inspectExerciseHeader "Skapa ett person-objekt till me-sidan" "uppgift/skapa-personobjekt-till-me-sida" "flask"
fileIsReadable "me/flask/person.py"
printUrl "person.png" "me/flask"
printUrl "person.html" "me/flask"
inspectExerciseHeader "Skapa ett dataobjekt till me-sidan" "uppgift/skapa-dataobjekt-till-me-sida" "flask"
fileIsReadable "me/flask/data.py"
printUrl "data.png" "me/flask"
printUrl "data.html" "me/flask"
inspectExerciseHeader "Skapa ett Black Jack spel" "uppgift/skapa_blackjack" "$KMOM/blackjack"
inspectCommand "main.py" "$EXEC_DIR/$KMOM/blackjack" "python3 main.py"
}
#
# Test kmom
#
function oopythonkmom04()
{
inspectLab "uppgift/python-med-regex" "lab3" "answer.py" "python3 answer.py"
inspectExerciseHeader "Skapa en bondgårdssdatabas" "uppgift/skapa-en-bondgards-databas" "flask"
executeSQLite "me/flask/db/farm.sqlite" ".schema"
inspectExerciseHeader "Visa bondgården på me-sidan" "uppgift/visa-bondgarden-pa-me-sida" "flask"
printUrl "app.cgi" "me/flask"
}
#
# Test kmom
#
function oopythonkmom05()
{
inspectLab "uppgift/python-med-rekursiva-funktioner" "lab4" "answer.py" "python3 answer.py"
inspectExerciseHeader "unorderedlist" "uppgift/terminalprogram-med-sortering-av-lista" "$KMOM/unorderedlist"
inspectCommand "test_list.py" "$EXEC_DIR/$KMOM/unorderedlist" "python3 test_list.py"
inspectCommand "main.py" "$EXEC_DIR/$KMOM/unorderedlist" "python3 main.py"
viewFileContent "unorderedlist.py" "me/$KMOM/unorderedlist"
}
#
# Test kmom
#
function oopythonkmom06()
{
inspectExerciseHeader "booking" "uppgift/bokningssystem" "$KMOM/booking"
inspectCommand "main.py" "$EXEC_DIR/$KMOM/booking" "python3 main.py"
}
#
# Test kmom
#
function oopythonkmom10()
{
:
}
#---------------------------- INSPECT DESIGN END ----------------------------