How to use finish_init method in autotest

Best Python code snippet using autotest_python

main.py

Source:main.py Github

copy

Full Screen

...186 if not game.pause:187 if game.menu:188 if menu.b1_1_rect.collidepoint(event.pos):189 game.player1 = Perso1(game,0,game.is_bot_1)190 game.player1.finish_init(game.player2)191 game.player2.finish_init(game.player1)192 elif menu.b2_1_rect.collidepoint(event.pos):193 game.player1 = Perso2(game,0,game.is_bot_1)194 game.player1.finish_init(game.player2)195 game.player2.finish_init(game.player1)196 elif menu.b3_1_rect.collidepoint(event.pos):197 game.player1 = Perso3(game,0,game.is_bot_1)198 game.player1.finish_init(game.player2)199 game.player2.finish_init(game.player1)200 elif menu.b4_1_rect.collidepoint(event.pos):201 game.player1 = Perso4(game,0,game.is_bot_1)202 game.player1.finish_init(game.player2)203 game.player2.finish_init(game.player1)204 elif menu.b1_2_rect.collidepoint(event.pos):205 game.player2 = Perso1(game,1,game.is_bot_2)206 game.player1.finish_init(game.player2)207 game.player2.finish_init(game.player1)208 elif menu.b2_2_rect.collidepoint(event.pos):209 game.player2 = Perso2(game,1,game.is_bot_2)210 game.player1.finish_init(game.player2)211 game.player2.finish_init(game.player1)212 elif menu.b3_2_rect.collidepoint(event.pos):213 game.player2 = Perso3(game,1,game.is_bot_2)214 game.player1.finish_init(game.player2)215 game.player2.finish_init(game.player1)216 elif menu.b4_2_rect.collidepoint(event.pos):217 game.player2 = Perso4(game,1,game.is_bot_2)218 game.player1.finish_init(game.player2)219 game.player2.finish_init(game.player1)220 elif menu.b_choix_rect.collidepoint(event.pos):221 game.is_bot_1 = True222 game.player1.bot = True223 elif menu.b_choix_2_rect.collidepoint(event.pos):224 game.is_bot_2 = True225 game.player2.bot = True226 elif menu.j_choix_rect.collidepoint(event.pos):227 game.is_bot_1 = False228 game.player1.bot = False229 elif menu.j_choix_2_rect.collidepoint(event.pos):230 game.is_bot_2 = False231 game.player2.bot = False232 if menu.attack_button_1.collidepoint(event.pos):233 if menu.choice_attack_1:...

Full Screen

Full Screen

logfile_loader.py

Source:logfile_loader.py Github

copy

Full Screen

...69 self.load_projector_file(f)70 # 设置初始化完成标志71 self.finish_init = 172 @property73 def finish_init(self):74 return self._finish_init75 # 设置标志76 @finish_init.setter77 def finish_init(self, is_finish):78 self.r.set("{}_{}_{}_is_finish".format(self.uid, self.runname,79 self.filename.name), 1)80 print(self.name + " is finish")81 self._finish_init = is_finish82 def set_redis_key(self, type, tag, file_path):83 _key = self.uid + '_' + self.runname + '_' + type + '_' + tag84 if _key in self.redis_tag:85 pass86 else:87 self.r.set(_key, str(file_path))88 self.redis_tag.append(_key)89 def set_cache(self, file_name, data):90 if not file_name.parent.exists():91 file_name.parent.mkdir(parents=True, exist_ok=True)...

Full Screen

Full Screen

InitWindow.py

Source:InitWindow.py Github

copy

Full Screen

1from .ui.Ui_init_widget import Ui_init_widget2from PyQt5.QtWidgets import QWidget3from PyQt5.QtCore import pyqtSignal4class InitWindow(QWidget, Ui_init_widget):5 finish_init = pyqtSignal(tuple, name='finish_init')6 def __init__(self, *args, **kwargs):7 super().__init__(*args, **kwargs)8 self.init_ui()9 self.init_signals()10 def init_ui(self):11 self.setupUi(self)12 def init_signals(self):13 self.start_button.clicked.connect(self.on_start_click)14 self.client_name.textChanged.connect(self.check_input)15 self.server_button.toggled.connect(self.check_server)16 self.server_ip.textChanged.connect(self.check_input)17 def on_start_click(self):18 connection_type = self.server_button.isChecked()19 ip = self.server_ip.text()20 self.finish_init.emit((ip, connection_type))21 def check_input(self):22 if self.client_name.text() and self.server_ip.text():23 self.start_button.setEnabled(True)24 else:25 self.start_button.setDisabled(True)26 def check_server(self):27 if self.server_button.isChecked():28 self.server_ip.setText('127.0.0.1')29 self.server_ip.setDisabled(True)30 if self.client_name.text():31 self.start_button.setEnabled(True)32 else:33 self.server_ip.setText('')34 self.server_ip.setEnabled(True)...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run autotest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful