User Tools

Site Tools


devel:pycharm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

devel:pycharm [2012/06/21 07:21]
norangshol created
devel:pycharm [2012/06/21 13:22] (current)
norangshol setting up unit tests to run automagically on code change in pycharm
Line 3: Line 3:
 We have been so lucky to receive license an open source license for NAV that contributors are free to use! We have been so lucky to receive license an open source license for NAV that contributors are free to use!
 Contact Morten Brekkevold for details if you have contributed to NAV to receive a copy of the license. ​ Contact Morten Brekkevold for details if you have contributed to NAV to receive a copy of the license. ​
 +
 +====== Setting up to unit tests and run em automagically on code change ======
 +
 +In the run configuration (nav-bar, left for the green RUN arrow), click edit run configurations):​
 +
 +
 +  * Top left, + sign for adding a new run configuration
 +  * Select "​Python'​s test" and "​py.test"​ in the tree-view on the left side bar.
 +
 +Run configuration options should be the following:
 +
 +  * Name: NAV UNITTESTS
 +  * Target: ''​$NAV-ROOT/​python/​runtests.py''​
 +  * Options: ticked and text box should contain: ''​../​tests/​unittests''​
 +  * Working directory: ''​$NAV-ROOT/​python''​
 +
 +  * Click apply and save.
 +
 +NAV UNITTESTS run configuration should now be available from the drop down of various run configurations.
 +
 +Run it once .. a panel pane at the bottom screen panel pops up and it starts looking for tests and running em.\\
 +Ignore output saying Empty test suite, that's just test cases which contains no unit tests so no worries.\\
 +BUT to the left at this bottom screen panel, below the green double arrow, CHECK IT. (tooltip says: toggle automatic rerun of tests on code change)
 +
 +Be a happy hacker practicing TDD!
 +
 +Note 1: Bottom screen panel can be toggled by clicking in bottom left corner! :-)\\
 +Note 2: Yes, it will run your tests, maybe not right after you click SAVE, but soon after.
  
 ====== Setting up PyLint ====== ====== Setting up PyLint ======
devel/pycharm.1340263273.txt.gz ยท Last modified: 2012/06/21 07:21 by norangshol