diff options
Diffstat (limited to 'qtip/loader')
-rw-r--r-- | qtip/loader/file.py | 2 | ||||
-rw-r--r-- | qtip/loader/qpi.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/qtip/loader/file.py b/qtip/loader/file.py index a39e15f6..6ef4bf3c 100644 --- a/qtip/loader/file.py +++ b/qtip/loader/file.py @@ -17,7 +17,7 @@ from qtip.loader.base import BaseLoader ROOT_DIR = path.join(path.dirname(__file__), path.pardir, path.pardir, - 'benchmarks') + 'resources') class FileLoader(BaseLoader): diff --git a/qtip/loader/qpi.py b/qtip/loader/qpi.py index 2a85766e..48f52e84 100644 --- a/qtip/loader/qpi.py +++ b/qtip/loader/qpi.py @@ -9,6 +9,7 @@ from yaml_file import YamlFileLoader +from qtip.base.constant import FormulaName from qtip.base.constant import SpecProp from qtip.util.formula import Formula @@ -31,5 +32,5 @@ class QPISpec(YamlFileLoader): class Section(object): def __init__(self, content, paths=None): self.name = content[SpecProp.NAME] - self.weight = content[SpecProp.WEIGHT] - self.formula = Formula(content[SpecProp.FORMULA]) + self.weight = content.get(SpecProp.WEIGHT, None) + self.formula = Formula(content.get(SpecProp.FORMULA, FormulaName.ARITHMETIC_MEAN)) |