Changeset 2c03d0c for .tests/test1.py


Ignore:
Timestamp:
2021-02-25T17:57:21Z (3 years ago)
Author:
/ <>
Children:
484e460
Parents:
5a1b05c
Message:

pylint is cute!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • .tests/test1.py

    r5a1b05c r2c03d0c  
    7070       
    7171def testSendMessage(sender, receiver, message, shouldreceive = True):
    72     sender.sendPrivMsg(b.nick, message)
     72    sender.sendPrivMsg(receiver.nick, message)
    7373    received = receiver.receive().find(message) != -1
    7474    if shouldreceive ^ received:
    7575        print('Test failed: Message from ' + sender.nick + ' to ' + receiver.nick)
    76         print('Sender Log:' + a.log)
    77         print('Receiver Log:' + b.log)
     76        print('Sender Log:' + sender.log)
     77        print('Receiver Log:' + receiver.log)
    7878        sys.exit(1)
    7979
     
    8989
    9090    print("Test: Send message")
    91     testSendMessage(clis[0],clis[1]),'ohai <3')
    92     testSendMessage(clis[1],clis[0]),'uwu *pounces*')
     91    testSendMessage(clis[0], clis[1], 'ohai <3')
     92    testSendMessage(clis[1], clis[0], 'uwu *pounces*')
    9393    print("Test passed")
    9494
    9595    print("Test: Block/Unblock")
    9696    clis[0].blockJabberBuddy(clis[1].nick)
    97     testSendMessage(clis[1],clis[0]),'m-meow?', shouldreceive = False)
     97    testSendMessage(clis[1], clis[0], 'm-meow?', shouldreceive = False)
    9898    clis[0].unblockJabberBuddy(clis[1].nick)
    99     testSendMessage(clis[1],clis[0]),'*purrs*')
     99    testSendMessage(clis[1], clis[0], '*purrs*')
    100100    print("Test passed")
    101101   
Note: See TracChangeset for help on using the changeset viewer.