1$ pip install eg
2$ eg <command>
VirtualTam's bookmarks
-
2015-05-02 -
2015-04-26 -
2015-04-24 Twisted implements a variety of networking and communication protocols and exposes them all as method-calls on your Python objects. Client and server implementations are provided for various standard protocols, including:
- HTTP (twisted.web)
- IMAP, POP, SMTP (twisted.mail)
- DNS (twisted.names)
- TLS (core)
- SSH, Telnet (twisted.conch)
- IRC, XMPP, OSCAR (twisted.words)
- Ethernet, IP, TUN/TAP (twisted.pair)
- NMEA (twisted.positioning)
-
2015-03-16 Jupyter Notebook viewer: https://github.com/jupyter/nbviewer
-
2015-03-15 -
2015-03-08 -
2015-03-03 -
2015-02-14 -
2015-02-13 Programming... Do you speak it?
-
2015-02-13 Python's built-in unittest module is quite cool, but a bit limited and way too verbose (read: it's quite not easy to incite developers to write unit tests)
I'm currently looking for more dev-friendly solutions, the key points being:
- writing test code should be easy and straight-forward -keep the focus on "what to test" instead of "how to transcribe a process to a test"
- parallelization! -we, spoiled developers, should make good use of our way-too-many-cores build machines...
- complete feature set!
- we don't want to just run tests...
- coverage reports (find dead/weak/untested code sections)
- output formatting (JUnit-XML seems to be quite a common format out there)
There seem to be 3 solutions in Python:
- stock unittest + project-dependent customizations / test helpers
- nosetests
- py.test
And 2 ways of gettings things done:
- keeping things stock: no external dependency, project-specific implementation...
- using a test framework: one more module in your (test) virtualenv, more concise tests, more features (// run, code coverage, etc.)
Some links:
-
2015-02-13 Given your unittests are in the
tests
directory:1# run a specific test module 2python -m unittest tests.<module> 3 4# run a specific test suite 5python -m unittest tests.<module>.<class> 6 7# run a specific test 8python -m unittest tests.<module>.<class>.<test> 9 10# run tests matching a given pattern 11python -m unittest discover -s tests -p <pattern>