summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAntoine Tenart2019-05-11 11:20:05 +0200
committerjvoisin2019-05-13 23:35:26 +0200
commitf19f6ed8b6ded81d2a1cc9d2fe606f71fcd0e27a (patch)
treed5982c72a91f2cd6a6d10e466b4b86e9937ff143 /tests
parent51ab2db2793e290f8df4791bf552e3a2531de8d4 (diff)
Rework the dependency checks to distinguish required/optional ones
Rework the dependencies definition to include a 'required' flags, which is passed by the check_dependencies helper to the callers, so that they can distinguish between required and optional dependencies. This help in two ways: - The unit test for the dependencies was now failing when an optional one was missing, due to a previous rework. - Mat2's --check-dependencies was referring to "required dependencies" and was misleading for the user as some of them could be optional. Signed-off-by: Antoine Tenart <antoine.tenart@ack.tf>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_libmat2.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_libmat2.py b/tests/test_libmat2.py
index de5f67c..64e679f 100644
--- a/tests/test_libmat2.py
+++ b/tests/test_libmat2.py
@@ -16,7 +16,8 @@ class TestCheckDependencies(unittest.TestCase):
16 def test_deps(self): 16 def test_deps(self):
17 ret = check_dependencies() 17 ret = check_dependencies()
18 for key, value in ret.items(): 18 for key, value in ret.items():
19 self.assertTrue(value, "The value for %s is False" % key) 19 if value['required']:
20 self.assertTrue(value['found'], "The value for %s is False" % key)
20 21
21 22
22class TestParserFactory(unittest.TestCase): 23class TestParserFactory(unittest.TestCase):