OLD | NEW |
1 import webbrowser | 1 import webbrowser |
2 import unittest | 2 import unittest |
3 import subprocess | 3 import subprocess |
4 from unittest import mock | 4 from unittest import mock |
| 5 import sys |
5 from test import support | 6 from test import support |
6 | 7 |
| 8 if sys.platform == 'ios': |
| 9 raise unittest.SkipTest("Can't run webbrowser tests on iOS") |
7 | 10 |
8 URL = 'http://www.example.com' | 11 URL = 'http://www.example.com' |
9 CMD_NAME = 'test' | 12 CMD_NAME = 'test' |
10 | 13 |
11 | 14 |
12 class PopenMock(mock.MagicMock): | 15 class PopenMock(mock.MagicMock): |
13 | 16 |
14 def poll(self): | 17 def poll(self): |
15 return 0 | 18 return 0 |
16 | 19 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 arguments=['openURL({},new-window)'.format(URL)]) | 186 arguments=['openURL({},new-window)'.format(URL)]) |
184 | 187 |
185 def test_open_new_tab(self): | 188 def test_open_new_tab(self): |
186 self._test('open_new_tab', | 189 self._test('open_new_tab', |
187 options=['-remote'], | 190 options=['-remote'], |
188 arguments=['openURL({},new-tab)'.format(URL)]) | 191 arguments=['openURL({},new-tab)'.format(URL)]) |
189 | 192 |
190 | 193 |
191 if __name__=='__main__': | 194 if __name__=='__main__': |
192 unittest.main() | 195 unittest.main() |
OLD | NEW |