Skip to content

Commit

Permalink
satisfying pep8speaks
Browse files Browse the repository at this point in the history
  • Loading branch information
bandophahita committed Oct 9, 2023
1 parent 4a221e8 commit b43ca10
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions tests/test_chrome_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,30 +112,39 @@ def test_can_get_chrome_for_win64():
os_sys_manager = OperationSystemManager("win64")
# using random folder to avoid using any possible cache
cache_manager = DriverCacheManager(os.path.join(".test", f"win64_{random()}"))
path = ChromeDriverManager(os_system_manager=os_sys_manager, cache_manager=cache_manager).install()
path = ChromeDriverManager(
os_system_manager=os_sys_manager, cache_manager=cache_manager
).install()
assert os.path.basename(os.path.dirname(path)) == "chromedriver-win64"


def test_can_get_chrome_for_win32():
os_sys_manager = OperationSystemManager("win32")
# using random folder to avoid using any possible cache
cache_manager = DriverCacheManager(os.path.join(".test", f"win32_{random()}"))
path = ChromeDriverManager(os_system_manager=os_sys_manager, cache_manager=cache_manager).install()
path = ChromeDriverManager(
os_system_manager=os_sys_manager, cache_manager=cache_manager
).install()
assert os.path.basename(os.path.dirname(path)) == "chromedriver-win32"


@patch("webdriver_manager.core.os_manager.platform")
def test_can_get_chrome_for_mac64(mock_platform):
mock_platform.processor = create_autospec(platform.processor, return_value="i386")
os_sys_manager = OperationSystemManager("mac64")
# using random folder to avoid using any possible cache
cache_manager = DriverCacheManager(os.path.join(".test", f"mac64_{random()}"))
path = ChromeDriverManager(os_system_manager=os_sys_manager, cache_manager=cache_manager).install()
path = ChromeDriverManager(
os_system_manager=os_sys_manager, cache_manager=cache_manager
).install()
assert os.path.basename(os.path.dirname(path)) == "chromedriver-mac-x64"


def test_can_get_chrome_for_mac64_m1():
os_sys_manager = OperationSystemManager("mac64_m1")
# using random folder to avoid using any possible cache
cache_manager = DriverCacheManager(os.path.join(".test", f"mac64_m1_{random()}"))
path = ChromeDriverManager(os_system_manager=os_sys_manager, cache_manager=cache_manager).install()
path = ChromeDriverManager(
os_system_manager=os_sys_manager, cache_manager=cache_manager
).install()
assert os.path.basename(os.path.dirname(path)) == "chromedriver-mac-arm64"

0 comments on commit b43ca10

Please sign in to comment.