Passed
Pull Request — dev (#1208)
by Patrik
04:04 queued 02:13
created

tests.test_console_scripts.test_console_scripts()   A

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nop 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