Browse Source

add test for not exists in __init__

master
Stephen J. Fuhry 5 years ago
parent
commit
494189435d
  1. 6
      test_xvfb.py

6
test_xvfb.py

@ -19,6 +19,12 @@ class TestXvfb(unittest.TestCase):
def setUp(self):
self.reset_display()
def test_xvfb_binary_not_exists(self):
with patch('xvfbwrapper.Xvfb.xvfb_exists') as xvfb_exists:
xvfb_exists.return_value = False
with self.assertRaises(EnvironmentError):
Xvfb()
def test_start(self):
xvfb = Xvfb()
self.addCleanup(xvfb.stop)

Loading…
Cancel
Save