def test_default(): keys = ['nick', 'goss'] values = ['python', 'nodejs'] expected = {'nick': 'python', 'goss': 'nodejs'} assert create_dict(keys, values) == expected
def test_check_types(keys, values): with pytest.raises(TypeError): create_dict(keys, values)
def test_fill_none(): keys = ['nick', 'goss', 'pasha'] values = ['python', 'nodejs'] expected = {'nick': 'python', 'goss': 'nodejs', 'pasha': None} assert create_dict(keys, values) == expected
def test_skip_values(extra_values): keys = ['nick', 'goss'] values = ['python', 'nodejs'] + extra_values expected = {'nick': 'python', 'goss': 'nodejs'} assert create_dict(keys, values) == expected
win = tkinter.Tk() win.attributes("-alpha", 0.4) win.wm_attributes('-topmost', 1) win.title("Majsoul helper") win.geometry("700x200") title_label = tkinter.Label(win, text="No data") title_label.pack() sim_label = tkinter.Label(win, text="") sim_label.pack() state_label = tkinter.Label(win, text="") state_label.pack() info_label = tkinter.Label(win, text="") info_label.pack() hash_dict = create_dict() driver = web_init() def calculate(): names, sims = shot_and_judge(hash_dict) # names = ["3s", "4s"] link = card_sequence_to_link(names) if len(names) % 3 == 2: cards = "" for name in names: cards += name title_label['text'] = cards