Skip to content

Commit 702f08d

Browse files
jayakumarcalex-savchuk
authored andcommitted
Changing the way test file pattern is specified. Fixes the issue when running test targets with py3 on Windows.
1 parent 0624de6 commit 702f08d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pytest.ini

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[pytest]
2+
python_files = *_tests.py

rake-tasks/crazy_fun/mappings/python.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,9 @@ def handle(fun, dir, args)
149149
task task_name => deps do
150150
copy_source_to_env
151151

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

0 commit comments

Comments
 (0)