Qtile 0.4 - Hacking Qtile

Using Xephyr and the test suite

Qtile has a very extensive test suite, using the Xephyr nested X server. When tests are run, a nested X server with a nested instance of Qtile is fired up, and then tests interact with the Qtile instance through the client API. The fact that we can do this is a great demonstration of just how completely scriptable Qtile is. In fact, Qtile is designed expressly to be scriptable enough to allow unit testing in a nested environment.

The Qtile repo includes a tiny helper script to let you quickly pull up a nested instance instance of Qtile in Xephyr, using your current configuration. Run it from the top-level of the repository, like this:

    ./test/scripts/xephyr                      

In practice, the development cyclce looks something like this:

  1. make minor code change
  2. run appropriate test: pry ./test_module.uMySuite
  3. GOTO 1, until hackage is complete
  4. run entire test suite: pry
  5. commit

Resources

Here are a number of resources that may come in handy:

Copyright (c) 2010 Aldo Cortesi