Cleaned out the tests folder. Added simple test gerber. Added simple unit test using the GUI.
This commit is contained in:
34
tests/other/destructor_test.py
Normal file
34
tests/other/destructor_test.py
Normal file
@@ -0,0 +1,34 @@
|
||||
import sys
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
|
||||
class MyObj():
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def __del__(self):
|
||||
print "##### Destroyed ######"
|
||||
|
||||
|
||||
def parse():
|
||||
o = MyObj()
|
||||
raise Exception("Intentional Exception")
|
||||
|
||||
|
||||
class Example(QtGui.QWidget):
|
||||
|
||||
def __init__(self):
|
||||
super(Example, self).__init__()
|
||||
|
||||
qbtn = QtGui.QPushButton('Raise', self)
|
||||
qbtn.clicked.connect(parse)
|
||||
|
||||
self.setWindowTitle('Quit button')
|
||||
self.show()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app = QtGui.QApplication(sys.argv)
|
||||
ex = Example()
|
||||
sys.exit(app.exec_())
|
||||
Reference in New Issue
Block a user