SeleniumHQ/selenium — pull request #86 by jayakumarc (2013-06-09 11:12:38+00:00)
Title: [CrazyFun] Fixing the issues when running python test targets on Windows

This patch fixes the issues which are happening **only** on Windows, when executing python test targets.

#### Changes made:

1. Error is thrown when running the test targets consecutively with different python versions(py2 to py3 or viz),
For example,
`go.bat //py:firefox_test:run method=ColorTests pyversion=C:\python26\python.exe` -> this goes fine

`go.bat //py:firefox_test:run method=ColorTests pyversion=C:\python33\python.exe` -> throws [error](https://gist.github.com/jayakumarc/5354781)

Issue is happening when virtualenv tries to overwrite the existing python resources under build/python dir. Doing the clean virtualenv install fixes this issue. That is, emptying the build/python dir before new python resources are getting copied.

2. Glob expression in the file path is not interpreted properly when running the test target with Py3.
say,
`go.bat //py:firefox_test:run method=ColorTests pyversion=C:\python33\python.exe`
throws error,
```
ERROR: file not found: build/lib/selenium/test/selenium/webdriver/firefox/*_tests.py
go aborted!
```
Specifying test files' pattern in pytest.ini file fixes this issue.

I've tested these changes in Windows7 & Mac-Lion.