def test_matches_template(): connect_info = {"directory": data_dir, "file_name": "People.csv"} csv_tbl = CSVDataTable("people", connect_info, None) match = csv_tbl.matches_template(csv_tbl.rows[0], template={ "playerID": "aasedo01", "birthYear": "1954" }) print(match) match = csv_tbl.matches_template(csv_tbl.rows[3], template={ "playerID": "aasedo01", "birthYear": "1954" }) print(match)
def t_matches_template(): r = { "playerID": "worthal01", "teamID": "BOS", "yearID": "1960", "AB": "1", "H": "0", "HR": "0", "RBI": "0" } tmp = {"playerID": "willite01"} test = CSVDataTable.matches_template(r, tmp) print("Matches = ", test)
def t_matches(): r = { "playerID": "webstra01", "teamID": "BOS", "yearID": "1960", "AB": "3", "H": "0", "HR": "0", "RBI": "1" } tmp = {'playerID': 'webstra01'} test = CSVDataTable.matches_template(r, tmp) print("Matches = ", test)
def test_matches(): template = { "playerID": "worthal01", "teamID": "BOS", "yearID": "1960", "AB": "1", "H": "0", "HR": "0", "RBI": "0" } match = {"teamID": "BOS"} print("Matches = ", CSVDataTable.matches_template(template, match))
def test_match(): row = {'cool': 'yes', 'db': 'no'} t = {'cool': '1'} result = CSVDataTable.matches_template(row, t) print(result)
def test_match(): row = {"cool": 'yes', "bd": 'no'} t = {"cool": 'yes'} result = CSVDataTable.matches_template(row, t) print(result)
def t_match_template(csv, tmp): row = {'cool': 'yes', 'db': 'no'} t = {'cool': 'yes'} result = CSVDataTable.matches_template(row, t) print("the match result is", result)