Home » Archive by categoryhephaestus

Using pexpect to automate Python scripts

As part of my hephaestus project, I have been using pexpect to automate my integration testing. This is a rough and ready method which allows for rapid development. More rigorous unit testing is conducted in the Pythonic way: self-contained in each module. Let’s first look at this short...
Continue reading »

Multithreaded function calls in Python

Whilst working on my dissertation project, hephaestus, I had a requirement to multithread an I/O-bound function. The following code is a simplified version, simmering multiple classes into a single module for demonstration purposes. The example output at the end was generated using pexpect, which you can read about...
Continue reading »