Skip to content

Commit

Permalink
Changing the way test file pattern is specified. Fixes the issue when…
Browse files Browse the repository at this point in the history
… running test targets with py3 on Windows.
  • Loading branch information
jayakumarc authored and alex-savchuk committed Sep 12, 2013
1 parent 0624de6 commit 702f08d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[pytest]
python_files = *_tests.py
5 changes: 3 additions & 2 deletions rake-tasks/crazy_fun/mappings/python.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ def handle(fun, dir, args)
task task_name => deps do
copy_source_to_env

tests = ["#{Python::lib_dir}/selenium/test/selenium/webdriver/#{browser_data[:dir]}/*_tests.py"]
pytest_args = [pytest_path] + tests
# Test file pattern has been specified in the pytest.ini file at project root dir
test_dir = ["#{Python::lib_dir}/selenium/test/selenium/webdriver/#{browser_data[:dir]}/"]
pytest_args = [pytest_path] + test_dir
pytest_args += ["-k", "-ignore_#{browser_data[:ignore]}"] if browser_data[:ignore]
pytest_args += ["-k" , ENV['method']] if ENV['method']
pytest_args += ["--junitxml=build/test_logs/python-#{browser}-#{Time.now.to_i}.xml"]
Expand Down

0 comments on commit 702f08d

Please sign in to comment.