[e988c2]: / tests / unit / query_model / test_graphs.py

Download this file

14 lines (10 with data), 357 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
from ehrql import Dataset
from ehrql.query_model.graphs import build_graph
from ehrql.tables.tpp import patients
def test_build_graph():
dataset = Dataset()
year = patients.date_of_birth.year
dataset.define_population(year >= 1940)
dataset.year = year
# We just want to check that nothing blows up
build_graph(dataset._compile())