Total Complexity | 2 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | # -*- coding: utf-8 - |
||
2 | |||
3 | """Tests the console_test module, without the test_oemof function. |
||
4 | |||
5 | This file is part of project oemof (github.com/oemof/oemof). It's copyrighted |
||
6 | by the contributors recorded in the version control history of the file, |
||
7 | available from its original location oemof/tests/test_processing.py |
||
8 | |||
9 | SPDX-License-Identifier: MIT |
||
10 | """ |
||
11 | from oemof.solph import _console_scripts as console_scripts |
||
12 | |||
13 | |||
14 | def test_console_scripts(): |
||
15 | # this is just a smoke test |
||
16 | console_scripts.check_oemof_installation() |
||
17 | |||
18 | |||
19 | def test_solver_check(): |
||
20 | solver_list = ["cbc", "invalid solver"] |
||
21 | results = console_scripts._check_oemof_installation(solver_list) |
||
22 | |||
23 | assert isinstance(results, dict) |
||
24 | assert list(results.keys()) == solver_list |
||
25 | assert not results["invalid solver"] |
||
26 |