def _createWidgetsFromGrid(self): layout = QtGui.QGridLayout(self) for location in Grid.allGridLocations(): card_widget = CardWidget(self) card_widget.setCard(self.grid.card(location)) layout.addWidget(card_widget, location[1], location[0]) self._linkWidgetAndLocation(card_widget, location)
def test_newGame_emits_cardChanged_signal_for_each_location(self): for location in Grid.allGridLocations(): assert (location in self.cardChanged_locations)
def test_newGame_sets_face_down_cards(self): for location in Grid.allGridLocations(): if location not in Grid.POINT_CARD_LOCATIONS: yield (self.check_newGame_sets_face_down_cards, location)