A Better AsyncTestCase for Python

If you need asynchronous support in python unit tests, there are a few possibilities.  A simple google search points you to a few packages, one being tornado.  Tornado's tornado.testing.AsyncTestCase seems straight-forward.  However it does have a shortcoming: it's not thread-safe.  Trying to use it with a thread will result in…

Notes On Writing Testable JavaScript Vol 1

When writing JavaScript, I am a big fan of minimizing functionality and variables exposed publicly, which we all know to be good practice. However, this leads to anonymous functions and functions hidden within closures.  So.... How Do You Test That? How exactly do you test private methods in JavaScript?  To…