I had this problem too and also had to use sed as a workround (thanks @munson!) - see here. Interestingly I was also testing python code that was installed under site-packages rather than running the tests against the checked-out code directly.
sed