-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_problem_3.py
More file actions
33 lines (27 loc) · 783 Bytes
/
test_problem_3.py
File metadata and controls
33 lines (27 loc) · 783 Bytes
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
# DO NOT MODIFY THE CODE IN THIS FILE
# Tests for Problem 3
# Travel Time
import os.path
import sys
from problem_3 import main
from tud_tests import *
def test_problem_2():
try:
exists = os.path.exists("problem_3.py")
assert exists == True
except:
sys.exit()
set_keyboard_input(["Portland","Seattle",174])
main()
output = get_display_output()
assert output == [
"Calculate Trip Duration\n",
"Enter the starting location: ",
"Enter the ending location: ",
"Enter the distance between the locations: ",
"\nDetails",
"\tStart:\t\t Portland",
"\tEnd:\t\t Seattle",
"\tDistance:\t 174 miles",
"\tDuration:\t 2.90 hours"
]