Tests for unit filtering

This commit is contained in:
Russ Garrett 2018-04-14 15:06:52 +01:00
commit ed974417ad
No known key found for this signature in database
GPG key ID: 68880BB652AB0570
2 changed files with 38 additions and 2 deletions

View file

@ -79,6 +79,12 @@ METADATA = {
'no_primary_key': {
'sortable_columns': [],
},
'units': {
'units': {
'distance': 'm',
'frequency': 'Hz'
}
},
}
},
}
@ -155,6 +161,16 @@ CREATE TABLE "complex_foreign_keys" (
FOREIGN KEY ("f3") REFERENCES [simple_primary_key](id)
);
CREATE TABLE units (
pk integer primary key,
distance int,
frequency int
);
INSERT INTO units VALUES (1, 1, 100);
INSERT INTO units VALUES (2, 5000, 2500);
INSERT INTO units VALUES (3, 100000, 75000);
CREATE TABLE [select] (
[group] text,
[having] text,
@ -189,7 +205,6 @@ CREATE VIEW simple_view AS
).replace('None', 'null') for row in generate_sortable_rows(201)
])
if __name__ == '__main__':
filename = sys.argv[-1]
if filename.endswith('.db'):