1515
1616@pytest .fixture
1717def testfile (testdir ):
18- return testdir .makepyfile (
19- """
18+ return testdir .makepyfile ("""
2019 import pytest
2120 @pytest.mark.nondestructive
2221 def test_pass(selenium): pass
23- """
24- )
22+ """ )
2523
2624
2725def failure_with_output (testdir , * args , ** kwargs ):
@@ -107,18 +105,14 @@ def test_default_caps_in_jsonwp(monkeypatch, testdir):
107105 variables = testdir .makefile (
108106 ".json" , '{{"capabilities": {}}}' .format (json .dumps (capabilities ))
109107 )
110- file_test = testdir .makepyfile (
111- """
108+ file_test = testdir .makepyfile ("""
112109 import pytest
113110 @pytest.mark.nondestructive
114111 def test_bstack_capabilities(driver_kwargs):
115112 assert driver_kwargs['options'].capabilities['browserstack.user'] == 'foo'
116113 assert driver_kwargs['options'].capabilities['browserstack.key'] == 'bar'
117114 assert driver_kwargs['options'].capabilities['name'] == '{0}'
118- """ .format (
119- test_name
120- )
121- )
115+ """ .format (test_name ))
122116 testdir .quick_qa (
123117 "--driver" , "BrowserStack" , "--variables" , variables , file_test , passed = 1
124118 )
@@ -131,16 +125,14 @@ def test_default_caps_in_jsonwp_with_conflict(monkeypatch, testdir):
131125 variables = testdir .makefile (
132126 ".json" , '{{"capabilities": {}}}' .format (json .dumps (capabilities ))
133127 )
134- file_test = testdir .makepyfile (
135- """
128+ file_test = testdir .makepyfile ("""
136129 import pytest
137130 @pytest.mark.nondestructive
138131 def test_bstack_capabilities(driver_kwargs):
139132 assert driver_kwargs['options'].capabilities['browserstack.user'] == 'foo'
140133 assert driver_kwargs['options'].capabilities['browserstack.key'] == 'bar'
141134 assert driver_kwargs['options'].capabilities['name'] == 'conflicting_name'
142- """
143- )
135+ """ )
144136 testdir .quick_qa (
145137 "--driver" , "BrowserStack" , "--variables" , variables , file_test , passed = 1
146138 )
@@ -153,8 +145,7 @@ def test_default_caps_in_W3C(monkeypatch, testdir):
153145 variables = testdir .makefile (
154146 ".json" , '{{"capabilities": {}}}' .format (json .dumps (capabilities ))
155147 )
156- file_test = testdir .makepyfile (
157- """
148+ file_test = testdir .makepyfile ("""
158149 import pytest
159150 @pytest.mark.nondestructive
160151 def test_bstack_capabilities(driver_kwargs):
@@ -163,8 +154,7 @@ def test_bstack_capabilities(driver_kwargs):
163154 'accessKey': 'bar',
164155 'sessionName': 'test_default_caps_in_W3C.test_bstack_capabilities'
165156 }
166- """
167- )
157+ """ )
168158 testdir .quick_qa (
169159 "--driver" , "BrowserStack" , "--variables" , variables , file_test , passed = 1
170160 )
@@ -180,8 +170,7 @@ def test_default_caps_in_W3C_with_conflict(monkeypatch, testdir):
180170 variables = testdir .makefile (
181171 ".json" , '{{"capabilities": {}}}' .format (json .dumps (capabilities ))
182172 )
183- file_test = testdir .makepyfile (
184- """
173+ file_test = testdir .makepyfile ("""
185174 import pytest
186175 @pytest.mark.nondestructive
187176 def test_bstack_capabilities(driver_kwargs):
@@ -190,8 +179,7 @@ def test_bstack_capabilities(driver_kwargs):
190179 'accessKey': 'bar',
191180 'sessionName': 'conflicting_name'
192181 }
193- """
194- )
182+ """ )
195183 testdir .quick_qa (
196184 "--driver" , "BrowserStack" , "--variables" , variables , file_test , passed = 1
197185 )
0 commit comments