This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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') |
This file contains hidden or 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 tools import TestDataCollection | |
from representations import Project | |
@pytest.fixture(scope='function') | |
def test_driver(request, selenium): | |
from test_automation.tools.test_driver import TestDriver | |
return TestDriver(selenium) |
This file contains hidden or 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 init_test_db(request): | |
""" | |
Creates a TestDataCollection instance which houses all the data representation objects. | |
:param request: py.test request module | |
:return: TestDataCollection instance | |
""" | |
tdc = TestDataCollection() | |
request.module.tdc = tdc |