Completed
Push — master ( f46766...a9fd17 )
by Jace
8s
created

describe_repr()   A

Complexity

Conditions 3

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 3
c 1
b 0
f 0
dl 0
loc 4
rs 10
1
# pylint: disable=misplaced-comparison-constant,unused-variable
0 ignored issues
show
introduced by
Bad option value 'misplaced-comparison-constant'
Loading history...
2
3
import pytest
4
5
from mine.data import Data
6
7
8
def describe_data():
9
10
    @pytest.fixture
11
    def data():
12
        return Data()
13
14
    def describe_repr():
15
16
        def it_should_always_be_a_simple_name(data):
17
            assert "settings" == repr(data)
18
19
    def describe_modified():
20
21
        def is_false_initially(data):
22
            assert False is data.modified
23
24
        def is_true_when_the_counter_changes(data):
25
            data.status.counter += 1
26
27
            assert True is data.modified
28
29
        def is_false_after_reading(data):
30
            data.status.counter += 1
31
32
            print(data.modified)
33
34
            assert False is data.modified
35