mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-13 10:09:43 +00:00
Fix tests so they can actually run locally (I failed)
This commit is contained in:
@@ -26,7 +26,9 @@ browsers = [{"platform": "macOS 10.12",
|
|||||||
|
|
||||||
|
|
||||||
def on_platforms(platforms):
|
def on_platforms(platforms):
|
||||||
if os.environ.get("TRAVIS"):
|
if not os.environ.get("TRAVIS"):
|
||||||
|
platforms = {'local'}
|
||||||
|
|
||||||
def decorator(base_class):
|
def decorator(base_class):
|
||||||
module = sys.modules[base_class.__module__].__dict__
|
module = sys.modules[base_class.__module__].__dict__
|
||||||
for i, platform in enumerate(platforms):
|
for i, platform in enumerate(platforms):
|
||||||
@@ -34,9 +36,12 @@ def on_platforms(platforms):
|
|||||||
d['desired_capabilities'] = platform
|
d['desired_capabilities'] = platform
|
||||||
name = "%s_%s" % (base_class.__name__, i + 1)
|
name = "%s_%s" % (base_class.__name__, i + 1)
|
||||||
module[name] = type(name, (base_class,), d)
|
module[name] = type(name, (base_class,), d)
|
||||||
|
|
||||||
return decorator
|
return decorator
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def create_browser(test_name, desired_capabilities):
|
def create_browser(test_name, desired_capabilities):
|
||||||
# return webdriver.Chrome()
|
# return webdriver.Chrome()
|
||||||
if os.environ.get("TRAVIS"):
|
if os.environ.get("TRAVIS"):
|
||||||
|
|||||||
Reference in New Issue
Block a user