There are some problems with 'run_tor()' and line-endings. It doesn't forsee any '\r\n' from 'Popen()' and since 'lines()' only splits on '\n', most of the tests fails.
With this little patch:
@@ -64,7 +64,7 @@ yield fp[i:i+4]
def lines(s): - out = s.split("\n") + out = s.splitlines()
I only get 2 errors in that script. The others like: self.assertTrue(out_verif.endswith("Configuration was valid\n"))
needs another patch which is beyond my Python knowledge.