- Timestamp:
- 2021-03-17T12:43:27Z (4 years ago)
- Children:
- a3d01fb
- Parents:
- 0167270
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
.tests/test1.py
r0167270 rda75c3d 11 11 SHOWLOG = False 12 12 SHOWTESTLOG = True 13 14 FUN = [ 15 "Did I ask you something?", 16 "Oh yeah, that's right.", 17 "Alright, alright. Now go back to work.", 18 "Buuuuuuuuuuuuuuuurp... Excuse me!", 19 "Yes?", 20 "No?", 21 ] 13 22 14 23 SEPARATOR = "="*60 … … 117 126 def yes_test(clis): 118 127 ret = False 119 for _ in range(100):120 clis[0].send_raw("PRIVMSG yes", loud = False, log = False)121 clis[0].receive()122 if ( not ret) and (clis[0].log.find("Did I ask you something?") != -1):128 clis[0].send_raw("PRIVMSG yes") 129 clis[0].receive() 130 for x, fun in enumerate(FUN): 131 if (clis[0].log.find(fun) != -1): 123 132 ret = True 124 if clis[0].log.find("Buuuuuuuuuuuuuuuurp") != -1: 125 ret = True 126 print("The RNG gods smile upon us") 133 if x: 134 print("The RNG gods smile upon us") 127 135 break 128 136 return ret
Note: See TracChangeset
for help on using the changeset viewer.