This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def read_input(): | |
with open('input_test.txt', 'r') as f: | |
return f.read().strip() | |
def parse(pattern): | |
if len(pattern) == 5: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def read_input(): | |
with open('input.txt', 'r') as f: | |
return f.read() | |
def run_it(seq): | |
grid = seq.splitlines(True) | |
start = grid[0].find('|') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
def read_input(): | |
with open('input.txt', 'r') as f: | |
return f.read().strip() | |
def get(reg, v): | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
def read_input(): | |
with open('input.txt', 'r') as f: | |
return f.read().strip() | |
def get(reg, v): | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import deque | |
from itertools import islice, izip_longest | |
from copy import copy | |
from functools import reduce | |
from operator import xor | |
def grouper(iterable, n, fillvalue=None): | |
args = [iter(iterable)] * n | |
return izip_longest(*args, fillvalue=fillvalue) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@pytest.fixture(scope='module', autouse=True) | |
def test_db(request): | |
""" | |
Creates a TestDataCollection instance which houses all the data representation objects. | |
:param request: py.test request module | |
:return: TestDataCollection instance | |
""" | |
from test_automation.representations.test_data_collection import TestDataCollection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#first | |
if browser.lower() == 'firefox': | |
driver = webdriver.Firefox | |
self._kwargs.update({'browser_profile' if self._use_grid else 'firefox_profile': firefox_profile()}) | |
desired_capabilities = webdriver.DesiredCapabilities.FIREFOX | |
#later | |
if self._use_grid: | |
host = get_config().getini("grid_host") | |
port = get_config().getini("grid_port") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Mutation Observer object | |
Used to detect and inspect changes to the DOM | |
See: | |
https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver | |
*/ | |
mutationObserver = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
from test_automation_representations import TestData | |
def test_something(): | |
// do some testing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@pytest.fixture() | |
def user(request): | |
user_name = request.param.get('name') | |
//do something | |
@pytest.fixture() | |
def account(request): | |
account_name = request.param.get('name') |