Skip to content

Commit

Permalink
Fix test dimensions setup.
Browse files Browse the repository at this point in the history
Entries with no keys defined are DimensionElements, but not
Dimensions, and are not permitted in (e.g.) data IDs.  This code was
always wrong, but daf_butler only recently starting catching the
error.
  • Loading branch information
TallJimbo committed Oct 5, 2020
1 parent 879fa72 commit c7e6b71
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions tests/test_quantumGraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,26 @@ class QuantumGraphTestCase(unittest.TestCase):
"""Tests the various functions of a quantum graph
"""
def setUp(self):
config = Config({"dimensions": {"version": 1,
"skypix": {},
"elements": {"A": {},
"B": {}}}})
config = Config({
"dimensions": {
"version": 1,
"skypix": {},
"elements": {
"A": {
"keys": {
"name": "id",
"type": "int",
},
}
"B": {
"keys": {
"name": "id",
"type": "int",
}
}
}
}
})
universe = DimensionUniverse(config=config)
# need to make a mapping of TaskDef to set of quantum
quantumMap = {}
Expand Down

0 comments on commit c7e6b71

Please sign in to comment.