- Timestamp:
- 2021-03-29T14:09:12Z (4 years ago)
- Children:
- dde98bb2
- Parents:
- 1849c5b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
.tests/btlib.py
r1849c5b ra181ec1 248 248 ret = ret & (clis[0].receive().find("qlist") != -1) 249 249 return ret 250 251 def run_tests(failed):252 clis = []253 clis += [IrcClient('test1', 'asd')]254 clis += [IrcClient('test2', 'asd')]255 for cli in clis:256 cli.connect()257 258 perform_test(failed, clis, yes_test, "Yes", debug_file)259 260 print("")261 for cli in clis:262 cli.jabber_login()263 264 perform_test(failed, clis, add_buddy_test, "Add/remove buddy")265 perform_test(failed, clis, message_test, "Send message")266 #perform_test(failed, clis, block_test, "Block user", debug_file)267 perform_test(failed, clis, rename_test, "Rename user")268 perform_test(failed, clis, status_test, "Change status")269 perform_test(failed, clis, offline_test, "Go offline")270 perform_test(failed, clis, default_target_test, "Change default target")271 perform_test(failed, clis, help_test, "Ask for help")272 273 if failed or SHOWLOG:274 print("")275 for cli in clis:276 print(SMOLPARATOR)277 print("Log "+ cli.nick+":")278 print(cli.log)279 print(SMOLPARATOR)280 281 if failed:282 print("\n" + SEPARATOR + "\nSome test have failed:")283 for fail in failed:284 print(fail)285 else:286 print("\n" + SEPARATOR + "\nAll tests have passed")287 288 if __name__ == "__main__":289 failed = []290 run_tests(failed)291 if failed:292 sys.exit(1)
Note: See TracChangeset
for help on using the changeset viewer.