Well..if you guys have been reading my stuff, you’ll know that I’ve done all my development so far on Ubuntu 10.04, Python 2.6 and Suds 0.4 (I think :)). And I’ve been churning out plenty of unit tests too for all those Web Service methods. Remember there were 121? I’ve made quite a bit of progress though; which you can see here.
Now all my unit tests were written using py.test on Linux. So when I pinged Dinis today, he mentioned that it was cool that so many tests were getting written, but he wanted a way to run them in Windows .. maybe after every build itself. So for that he wanted me to find out exactly how he could run these tests in Windows. So after a little bit of playing around, it turns out it isn’t too hard at all :). Here are the steps:
a) Install Python 2.6 for Windows. The main version. Not Iron Python. It might well work with that as well but I didn’t try. There’s a newer version out, but I’d written all my code in Linux on Python 2.6 so I figured I’d keep it simple to start off.
b) Add c:\Python26\Scripts to the Windows path. Replace the path if you have installed Python elsewhere.
c) Now install Suds. Open up CMD and type easy_install -U suds.
d) Install Py.test. Type easy_install -U pytest
e) Remove the __pycache__directories from inside the Unit test directories if those exist. This is needed coz all my code was written on Linux and the cache will contain stuff specific to Linux..which I don’t need here.
f) That’s it. Run your unit test. Here’s a sample screenshot 🙂
So if you want to have a look at what I’ve pushed over to Git, you can always do so by looking here and here. Hopefully by the end of this week..I should be through with all the Unit tests..unless Dinis gives me something else to do :). Cya.