def test_browser_driver_retry_count():
    """Checks that the retry count is being used"""
    from splinter.browser import _DRIVERS
    from splinter import Browser

    global test_retry_count

    def test_driver(*args, **kwargs):
        global test_retry_count
        test_retry_count += 1
        raise OSError("test_retry_count: " + str(test_retry_count))

    _DRIVERS["test_driver"] = test_driver

    test_retry_count = 0
    with pytest.raises(IOError) as e:
        Browser("test_driver")
    assert "test_retry_count: 3" == str(e.value)

    test_retry_count = 0
    with pytest.raises(IOError) as e:
        Browser("test_driver", retry_count=10)
    assert "test_retry_count: 10" == str(e.value)

    del test_retry_count
    del _DRIVERS["test_driver"]
Checks that the retry count is being used
tests/tests_splinter/test_browser.py