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)
from beams.details.all_beams import AllBeams from dxf.dxf import DxfDraw from common.load_data import LoadData from common.messages import Messages # import beams.dimensions.trial_dim app_data = LoadData() if __name__ == "__main__": # appData.getInputFilePath() Messages.i("") all_beams = AllBeams(app_data) dxfDraw = DxfDraw(app_data) dxfDraw.makeDxf(all_beams.getAllBeamsEntities(), all_beams.number_of_beams) try: pass except: print("There is an unknown error in the program, contact developers") # beams.availableLineTypes() pass
def test_i(self): with mock.patch('builtins.print') as fake_print: Messages.i() assert fake_print.call_count == 1