Commits
- Added properties - controller.py: 0c75a0590a0e683bfbaaba55488fb780e33579b5
- Unittests for connection.py - 100%coverage: 2a5086326b8a72ed406b6a61ccf33b09d02345a5
- Changes in connection.py. Added unittests for connection.py: 9ad1ed7e21dcec56b54e4a53e32d075db9c2dcf3
- Added unittests server.py - 100% coverage: 9c74a37a24e7704973427cd939111b740a492fc8
- test for OSError in terminate: fab6c53deafb1bc5b5005a9fdccacd763972e51f
- remove unnecessarry: e8c38b7a7e6a82e3d1d235214b0255642aa3256a
- modify gitignore: 7a4db71936352e6e51a9f27f38ca22f70abb608b
- modify gitignore: b7d83a907598b77df7ee1927907c814e615ede63
- Removed os.devnull exception: bafe6905dfceed7870087bd95152ae0f2e89f7de
- Removed os.devnull exception: eb0895dbb0625b9b58d01bcd815607b0abc1aacf
- Removed os.devnull exception: 03895c871a61f5c0ed4a930d7a69802a5d927a3c
- Removed os.devnull exception: d74829c50a8aa1f3e61f1d6211ee20ac2f619fe5
Things done
Last two days were almost devoted to unittests. I learnt how to use pytest-cov. The command issued by me is
I also learnt how to make mock classes and functions. I also learnt about monkeypatch techniques. Some links about these are:
- http://holgerkrekel.net/2009/03/03/monkeypatching-in-unit-tests-done-right/
- http://pytest.org/latest/monkeypatch.html#_pytest.monkeypatch.monkeypatch.setattr
- http://stackoverflow.com/questions/6018040/py-test-use-monkeypatch-in-custom-funcargs
I have achieved 100% coverage for server.py and connection
Next..
- Write Makefile for pylint and pep8
- 100% coverage for rest files
- Integration tests
Comments Section
Feel free to comment on the post but keep it clean and on topic.
blog comments powered by Disqus