예제 #1
0
 def test_continuePrompt(self):
     with mock.patch('builtins.print') as fake_print, \
         mock.patch('builtins.input') as fake_input:
         Messages.continuePrompt("yes")
         fake_input.assert_called_once()
         fake_print.assert_called_once()
         fake_input.assert_called_with("yes")
예제 #2
0
파일: dxf.py 프로젝트: itrevex/adds
    def makeDxf(self, entities, number_of_beams):
        self.drawEntities(entities)
        #setup viewports
        VPort(self.dwg, number_of_beams)

        output_path = self.app_data.getOutPutFile()
        try:
            self.dwg.saveas(output_path)
            Messages.i("")
            Messages.i(MessageCodes.INFO_DXF_GENERATED % output_path)
        except PermissionError:
            Messages.showError(MessageCodes.ERROR_OPEN_DXF)

        Messages.continuePrompt(MessageCodes.INFO_CONTINUE_PROMPT)