File tree Expand file tree Collapse file tree 1 file changed +22
-6
lines changed
Expand file tree Collapse file tree 1 file changed +22
-6
lines changed Original file line number Diff line number Diff line change 33For more information on writing benchmarks:
44https://asv.readthedocs.io/en/stable/writing_benchmarks.html."""
55
6- from hats_tap import example_benchmarks
6+ import pathlib
77
8+ from hats_tap .adql_to_lsdb import parse_adql_entities
89
9- def time_computation ():
10+
11+ def time_sample1_parse ():
1012 """Time computations are prefixed with 'time'."""
11- example_benchmarks . runtime_computation ()
13+ samples_dir = pathlib . Path ( __file__ ). parent . parent / "src" / "hats_tap" / "samples"
1214
15+ adql = (samples_dir / "sample1.adql" ).read_text ()
16+ result = parse_adql_entities (adql )
1317
14- def mem_list ():
15- """Memory computations are prefixed with 'mem' or 'peakmem'."""
16- return example_benchmarks .memory_computation ()
18+ assert result ["tables" ] == ["gaia_dr3.gaia" ]
19+ assert result ["columns" ] == [
20+ "source_id" ,
21+ "ra" ,
22+ "dec" ,
23+ "phot_g_mean_mag" ,
24+ "phot_variable_flag" ,
25+ ]
26+ assert result ["spatial_search" ] == {
27+ "type" : "ConeSearch" ,
28+ "ra" : 270.0 ,
29+ "dec" : 23.0 ,
30+ "radius" : 0.25 ,
31+ }
32+ assert result ["limits" ] == 15
You can’t perform that action at this time.
0 commit comments