Exemplo n.º 1
0
def test_mkdir(tmpdir):
    direc_path = tmpdir.strpath + "/test"
    utils.mkdir(direc_path)
    assert (os.path.isdir(direc_path))
    utils.mkdir(direc_path)
Exemplo n.º 2
0
from autowebcompat import utils

MAX_THREADS = 5
MAX_INTERACTION_DEPTH = 7

if sys.platform.startswith('linux'):
    chrome_bin = 'tools/chrome-linux/chrome'
    nightly_bin = 'tools/nightly/firefox-bin'
elif sys.platform.startswith('darwin'):
    chrome_bin = 'tools/chrome.app/Contents/MacOS/chrome'
    nightly_bin = 'tools/Nightly.app/Contents/MacOS/firefox'
elif sys.platform.startswith('win32'):
    chrome_bin = 'tools\\Google\\Chrome\\Application\\chrome.exe'
    nightly_bin = 'tools\\Nightly\\firefox.exe'

utils.mkdir('data')

bugs = utils.get_bugs()
print(len(bugs))

with open('get_xpath.js', 'r') as f:
    get_xpath_script = f.read()


def set_timeouts(driver):
    driver.set_script_timeout(30)
    driver.set_page_load_timeout(30)
    driver.implicitly_wait(30)


def wait_loaded(driver):
Exemplo n.º 3
0
def test_mkdir():
    d = TemporaryDirectory()
    direc_path = d.name + "/test"
    utils.mkdir(direc_path)
    assert (os.path.isdir(direc_path))
    utils.mkdir(direc_path)