Fix #142: Firefox opening multiple windows
Try to open new tab and not window. Fix test case fail.
This commit is contained in:
parent
84694f95ce
commit
a1c1092987
2
buku.py
2
buku.py
@ -2239,7 +2239,7 @@ def browse(url):
|
||||
os.dup2(fd, 2)
|
||||
os.dup2(fd, 1)
|
||||
try:
|
||||
webbrowser.open(url)
|
||||
webbrowser.open(url, new=2)
|
||||
except Exception as e:
|
||||
logerr('browse(): %s', e)
|
||||
finally:
|
||||
|
@ -235,7 +235,7 @@ def test_browse(url, opened_url):
|
||||
with mock.patch('buku.webbrowser') as m_webbrowser:
|
||||
import buku
|
||||
buku.browse(url)
|
||||
m_webbrowser.open.assert_called_once_with(opened_url)
|
||||
m_webbrowser.open.assert_called_once_with(opened_url, new=2)
|
||||
|
||||
|
||||
@only_python_3_5
|
||||
|
Loading…
x
Reference in New Issue
Block a user