Failed Conditions
Pull Request — master (#2076)
by Abdeali
02:11
created

InteractionsTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %
Metric Value
dl 0
loc 10
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_() 0 8 1
1
import unittest
2
3
from pyprint.NullPrinter import NullPrinter
4
5
from coalib.output.Interactions import fail_acquire_settings
6
from coalib.output.printers.LogPrinter import LogPrinter
7
8
9
class InteractionsTest(unittest.TestCase):
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable unittest does not seem to be defined.
Loading history...
10
11
    def test_(self):
12
        log_printer = LogPrinter(NullPrinter())
13
        self.assertRaises(TypeError, fail_acquire_settings, log_printer, None)
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable log_printer does not seem to be defined.
Loading history...
Comprehensibility Best Practice introduced by
The variable TypeError does not seem to be defined.
Loading history...
Comprehensibility Best Practice introduced by
The variable fail_acquire_settings does not seem to be defined.
Loading history...
14
        self.assertRaises(AssertionError,
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable AssertionError does not seem to be defined.
Loading history...
15
                          fail_acquire_settings,
16
                          log_printer,
17
                          {"setting": ["description", "bear"]})
18
        self.assertEqual(fail_acquire_settings(log_printer, {}), None)
19