Skip to content

Commit

Permalink
unit test runner under debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
IlgarLunin committed Feb 7, 2019
1 parent fec72e0 commit bec47f9
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
"program": "${workspaceFolder}/launcher.py",
"console": "integratedTerminal"
},
{
"name": "Python: PyFlow unittest",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/unittest_runner.py",
"console": "integratedTerminal"
},
{
"name": "Python: PyFlow debug",
"type": "python",
Expand Down
11 changes: 10 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
{
"python.pythonPath": "C:\\Python3\\python.exe"
"python.pythonPath": "C:\\Python37\\python.exe",
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.pyd": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/__pycache__": true,
}
}
4 changes: 4 additions & 0 deletions PyFlow/Tests/TestGeneral.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ def test_add_int(self):
edge = g.addEdge(addNode1.getPinByName('out', PinSelectionGroup.Outputs), addNode2.getPinByName('a', PinSelectionGroup.Inputs))
self.assertIsNotNone(edge, "FAILED TO ADD EDGE")
self.assertEqual(addNode2.getData('out'), 5, "NODES EVALUATION IS INCORRECT")


if __name__ == '__main__':
unittest.main()
7 changes: 7 additions & 0 deletions unittest_runner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import unittest


if __name__ == "__main__":
loader = unittest.TestLoader()
suite = loader.discover("PyFlow/Tests")
unittest.TextTestRunner().run(suite)

0 comments on commit bec47f9

Please sign in to comment.