- testcode_path = os.path.join(
- os.path.dirname(os.path.abspath(__file__)),
- 'mysqldb_test_monkey_patch.py',
- )
- output = run_python(testcode_path)
- lines = output.splitlines()
- self.assertEqual(len(lines), 2, output)
- self.assertEqual(lines[0].replace("psycopg,", ""),
- 'mysqltest MySQLdb,os,select,socket,thread,time')
- self.assertEqual(lines[1], "connect True")