def test_parse_parse(full_grid): try: cimpyorm.auxiliary.get_path("SCHEMAROOT") except KeyError: pytest.skip(f"Schemata not configured") path = "integration_test" session, m = parse(full_grid, MySQL(path=path, host="localhost")) session.close() session, m = parse(full_grid, MySQL(path=path, host="localhost")) assert session.query(m.Terminal).first().ConductingEquipment session.close() MySQL(path=path, host="localhost").drop()
def test_parse_parse(full_grid): try: cimpyorm.auxiliary.get_path("SCHEMAROOT") except KeyError: pytest.skip(f"Schemata not configured") path = os.path.join(full_grid, ".integration_test.db") session, m = parse(full_grid, SQLite(path=path)) session.close() session, m = parse(full_grid, SQLite(path=path)) assert session.query(m.Terminal).first().ConductingEquipment session.close() os.remove(path)
def test_parse_inmemory(full_grid): try: cimpyorm.auxiliary.get_path("SCHEMAROOT") except KeyError: pytest.skip(f"Schemata not configured") session, m = parse(full_grid, InMemory) session.close()
def test_parse_load(full_grid): try: cimpyorm.auxiliary.get_path("SCHEMAROOT") except KeyError: pytest.skip(f"Schemata not configured") path = "integration_test" session, m = parse(full_grid, MySQL(path=path, host="localhost")) session.close() session, m = load(MySQL(path=path, host="localhost")) session.close() MySQL(path=path, host="localhost").drop()
def test_parse_load(full_grid): try: cimpyorm.auxiliary.get_path("SCHEMAROOT") except KeyError: pytest.skip(f"Schemata not configured") path = os.path.join(full_grid, ".integration_test.db") session, m = parse(full_grid, SQLite(path=path)) session.close() session, m = load(path) session.close() os.remove(path)