Skip to content

Commit

Permalink
(no code changes): updated test case
Browse files Browse the repository at this point in the history
Updated the multiple_disnew_images test case to show off the multiple
image box
  • Loading branch information
robertlugg committed Jun 4, 2015
1 parent 62a96b8 commit 6d17704
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 190 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test_cases/images/daffy duck.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test_cases/images/dave.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test_cases/images/mickey.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test_cases/images/minnie.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 16 additions & 20 deletions test_cases/multiple_disney_images.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

"""
From stackoverflow:
Expand All @@ -14,26 +13,23 @@
import easygui as eg

# A welcome message
eg.msgbox ("Welcome to the quiz", "Quiz!")
# A short splash screen this could be looped
Finish = "Start"
while Finish == "Start":

Finish = eg.buttonbox("Do you want to start the quiz or quit?","Welcome",["Start","Quit"])
if Finish == "Quit":
break
#Question 1
eg.msgbox("Welcome to the quiz", "Quiz!")

while 1:
# Question 1
images = list()
images.append('images/mickey.gif')
images.append('images/minnie.gif')
images.append('images/daffy duck.gif')
images.append('images/dave.gif')
image = "mickey.gif"
choices = ["Mickey","Minnie","Daffy Duck","Dave"]
reply=eg.buttonbox("Who is this?",image = image,choices = choices)
choices = ["Mickey", "Minnie", "Daffy Duck", "Dave"]
reply = eg.buttonbox("Click on mickey:", images=images, choices=['Cancel'])
if reply=='Cancel':
break

if reply == "Mickey":
eg.msgbox("Well done!","Correct")
if reply == images[0]:
eg.msgbox("Well done!", "Correct")
else:
eg.msgbox("Wrong","Failure")

# This works, but if I change the line

# reply=eg.buttonbox("Who is this?",image=[image,image2,image3,image4],choices = choices)
eg.msgbox("Wrong", "Failure")

# But that doesn't seem to work, does anyone know if you can have more than one image per buttonbox?
85 changes: 0 additions & 85 deletions test_cases/multiprocess_prototype_C.py

This file was deleted.

85 changes: 0 additions & 85 deletions test_cases/multiprocess_prototype_D.py

This file was deleted.

0 comments on commit 6d17704

Please sign in to comment.