Best Python code snippet using ATX
test_spellcheck.py
Source:test_spellcheck.py
...18 self.assert_suggestions('drow', ['draw'], ['draw'])19 def test_not_misspelled(self):20 """With only completely different words, there are no candidates."""21 self.assert_suggestions('fire_laser', ['draw', 'update'], [])22 def test_misspelled_on_mouse_down(self):23 self.assert_best_suggestion('onmousedown', 'on_mouse_down')24 def test_misspelled_on_mouse_down2(self):25 self.assert_best_suggestion('onMouseDown', 'on_mouse_down')26 def test_misspelled_on_mouse_down3(self):27 self.assert_best_suggestion('on_muose_Down', 'on_mouse_down')28 def test_misspelled_on_mouse_down4(self):29 self.assert_best_suggestion('on_mouse_don', 'on_mouse_down')30class LoggingSpellCheckResult:31 def __init__(self):32 self.warnings = []33 self.errors = []34 self.bad_handlers = []35 def warn(self, msg, found, suggestion):36 self.warnings.append((found, suggestion))...
viewer.py
Source:viewer.py
...27 running = False28 29 if self.on_mouse_down is not None and pygame.mouse.get_pressed()[0]:30 x, y = pygame.mouse.get_pos()31 self.on_mouse_down(x//self.pixel_size, y//self.pixel_size)32 Z = self.update_func()33 surf = pygame.surfarray.make_surface(Z)34 self.display.blit(surf, (0, 0))35 pygame.display.update()...
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.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!