Changeset da75c3d for .tests/test1.py


Ignore:
Timestamp:
2021-03-17T12:43:27Z (4 years ago)
Author:
/ <>
Children:
a3d01fb
Parents:
0167270
Message:

yes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • .tests/test1.py

    r0167270 rda75c3d  
    1111SHOWLOG = False
    1212SHOWTESTLOG = True
     13
     14FUN = [
     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]
    1322
    1423SEPARATOR = "="*60
     
    117126def yes_test(clis):
    118127    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):
    123132            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")
    127135            break
    128136    return ret
Note: See TracChangeset for help on using the changeset viewer.