- I've finally run the tests with OK result (56 tests in 102.937 sec)

- I had to play with module imports as they created a lot of error in
the tests although in reality the program worked OK.
- I've fixed some mistakes in TcL commands (they were testing isinstance
against the like of Geometry instead of FlatCAMGeometry)
- I've had to add some fixes in ObjectCollections.py (error on
create_index() method but Marco already fixed this in the checkbox
in project tab pull request and knew about this.
- Although at some point the tests run fine, I've made some checkings
on my own over the Tcl commands and discovered errors which I fixed as
mentioned above.
- conclusion is that tests are just a must and do not cover everything
(like saving projects which at some point by juggling with imports I
braked and tests were 100% OK)
This commit is contained in:
Marius Stanciu
2018-05-30 02:17:34 +03:00
parent da9f890c39
commit 3b9767cc6f
47 changed files with 63 additions and 105 deletions

View File

@@ -17,7 +17,7 @@ import re
import webbrowser
import os
import tkinter
from PyQt4 import QtCore
from PyQt4 import Qt, QtCore, QtGui
import time # Just used for debugging. Double check before removing.
from xml.dom.minidom import parseString as parse_xml_string
from contextlib import contextmanager
@@ -27,10 +27,10 @@ from contextlib import contextmanager
########################################
import FlatCAMVersion
from FlatCAMWorker import Worker
from ObjectCollection import *
from FlatCAMObj import *
from PlotCanvas import *
from FlatCAMGUI import *
import ObjectCollection
from FlatCAMObj import FlatCAMCNCjob, FlatCAMExcellon, FlatCAMGerber, FlatCAMGeometry, FlatCAMObj
from PlotCanvas import PlotCanvas
from FlatCAMGUI import FlatCAMGUI, GlobalOptionsUI, FlatCAMActivityView, FlatCAMInfoBar
from FlatCAMCommon import LoudDict
from FlatCAMShell import FCShell
from FlatCAMDraw import FlatCAMDraw
@@ -39,6 +39,8 @@ from MeasurementTool import Measurement
from DblSidedTool import DblSidedTool
import tclCommands
from camlib import *
########################################
## App ##
@@ -471,7 +473,7 @@ class App(QtCore.QObject):
#self.options_write_form()
self.on_options_combo_change(0) # Will show the initial form
self.collection = ObjectCollection()
self.collection = ObjectCollection.ObjectCollection()
self.ui.project_tab_layout.addWidget(self.collection.view)
#### End of Data ####
@@ -1065,7 +1067,7 @@ class App(QtCore.QObject):
t3 = time.time()
self.log.debug("%f seconds converting units." % (t3 - t2))
FlatCAMApp.App.log.debug("Moving new object back to main thread.")
self.log.debug("Moving new object back to main thread.")
# Move the object to the main thread and let the app know that it is available.
obj.moveToThread(QtGui.QApplication.instance().thread())