Skip to content

Commit

Permalink
[py] use 'NUL' for /dev/null on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
lmtierney committed Oct 17, 2018
1 parent d2e5b54 commit a0d2b9c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ def test_add_encoded_extension(options):


def test_get_extensions_from_extension_files(options, mocker):
null = 'NUL' if platform.system().lower() == 'windows' else '/dev/null'
mocker.patch(
'selenium.webdriver.chrome.options.open'.format(__name__)).return_value = open('/dev/null')
'selenium.webdriver.chrome.options.open'.format(__name__)).return_value = open(null)
mocker.patch('base64.b64encode').return_value = 'foo'.encode()
options._extension_files = ['foo']
assert 'foo' in options.extensions
Expand Down

0 comments on commit a0d2b9c

Please sign in to comment.