@@ -30,70 +30,70 @@ def test_echo_env(testdir):
30
30
os .environ ['PYTESTECHO' ] = '123'
31
31
result = testdir .runpytest ('--echo-env=PYTESTECHO' )
32
32
result .stdout .fnmatch_lines ([
33
- "PYTESTECHO: 123" ,
33
+ " PYTESTECHO: 123"
34
34
])
35
35
36
36
37
37
def test_echo_version (testdir ):
38
38
result = testdir .runpytest ('--echo-version=pytest_echo' )
39
- result .stdout .fnmatch_lines (["pytest_echo: %s" % pytest_echo .__version__ ])
39
+ result .stdout .fnmatch_lines ([" pytest_echo: %s" % pytest_echo .__version__ ])
40
40
41
41
42
42
def test_echo_all (testdir ):
43
43
os .environ ['PYTESTECHO' ] = '123'
44
44
result = testdir .runpytest ('--echo-version=pytest_echo' ,
45
45
'--echo-env=PYTESTECHO' )
46
- result .stdout .fnmatch_lines (["PYTESTECHO: 123" ])
47
- result .stdout .fnmatch_lines (["pytest_echo: %s" % pytest_echo .__version__ ])
46
+ result .stdout .fnmatch_lines ([" PYTESTECHO: 123" ])
47
+ result .stdout .fnmatch_lines ([" pytest_echo: %s" % pytest_echo .__version__ ])
48
48
49
49
50
50
def test_echo_attr (testdir ):
51
51
result = testdir .runpytest ('--echo-attr=test_echo.ATTR_INT' )
52
- result .stdout .fnmatch_lines (['test_echo.ATTR_INT: 111' ])
52
+ result .stdout .fnmatch_lines ([' test_echo.ATTR_INT: 111' ])
53
53
54
54
55
55
def test_echo_attr_dict (testdir ):
56
56
result = testdir .runpytest ('--echo-attr=test_echo.ATTR_DICT.key' )
57
- result .stdout .fnmatch_lines (["test_echo.ATTR_DICT.key: 'value'" ])
57
+ result .stdout .fnmatch_lines ([" test_echo.ATTR_DICT.key: 'value'" ])
58
58
59
59
60
60
def test_echo_attr_list (testdir ):
61
61
result = testdir .runpytest ('--echo-attr=test_echo.ATTR_LIST.2' )
62
- result .stdout .fnmatch_lines ([u"test_echo.ATTR_LIST.2: 13" ])
62
+ result .stdout .fnmatch_lines ([u" test_echo.ATTR_LIST.2: 13" ])
63
63
64
64
65
65
def test_echo_attr_list_inner (testdir ):
66
66
result = testdir .runpytest ('--echo-attr=test_echo.ATTR_LIST.3.1' )
67
- assert u"test_echo.ATTR_LIST.3.1: 22" in result .stdout .lines
67
+ assert u" test_echo.ATTR_LIST.3.1: 22" in result .stdout .lines
68
68
69
69
70
70
def test_echo_attr_list_composite (testdir ):
71
71
result = testdir .runpytest ('--echo-attr=test_echo.ATTR_COMPOSITE.key1' ,
72
72
'--echo-attr=test_echo.ATTR_COMPOSITE.key2.3' )
73
- assert u"test_echo.ATTR_COMPOSITE.key1: 'value1'" in result .stdout .lines
74
- assert u"test_echo.ATTR_COMPOSITE.key2.3: 14" in result .stdout .lines
73
+ assert u" test_echo.ATTR_COMPOSITE.key1: 'value1'" in result .stdout .lines
74
+ assert u" test_echo.ATTR_COMPOSITE.key2.3: 14" in result .stdout .lines
75
75
76
76
77
77
def test_echo_attr_list_callable (testdir ):
78
78
result = testdir .runpytest ('--echo-attr=test_echo.FUNC' )
79
79
result .stdout .fnmatch_lines ([
80
- "test_echo.FUNC: <function FUNC*" ,
80
+ " test_echo.FUNC: <function FUNC*" ,
81
81
])
82
82
83
83
84
84
def test_echo_attr_object_attr (testdir ):
85
85
result = testdir .runpytest ('--echo-attr=test_echo.dummy.attr' )
86
86
result .stdout .fnmatch_lines ([
87
- "test_echo.dummy.attr: 1" ,
87
+ " test_echo.dummy.attr: 1" ,
88
88
])
89
89
90
90
91
91
def test_echo_attr_module_object_attr (testdir ):
92
92
result = testdir .runpytest ('--echo-attr=linecache.cache.__class__' )
93
93
if sys .version_info [0 ] == 2 :
94
- match = "linecache.cache.__class__: <type 'dict'>"
94
+ match = " linecache.cache.__class__: <type 'dict'>"
95
95
elif sys .version_info [0 ] == 3 :
96
- match = "linecache.cache.__class__: <class 'dict'>"
96
+ match = " linecache.cache.__class__: <class 'dict'>"
97
97
98
98
result .stdout .fnmatch_lines ([match ])
99
99
@@ -107,7 +107,7 @@ def pytest_configure(config):
107
107
""" )
108
108
result = testdir .runpytest ('--echo-attr=django.conf.settings.DEBUG' )
109
109
result .stdout .fnmatch_lines ([
110
- "django.conf.settings.DEBUG: False" ,
110
+ " django.conf.settings.DEBUG: False" ,
111
111
])
112
112
113
113
def test_django_settings_extended (testdir ):
@@ -120,6 +120,6 @@ def pytest_configure(config):
120
120
""" )
121
121
result = testdir .runpytest ('--echo-attr=django.conf.settings.DATABASES.default.ENGINE' )
122
122
result .stdout .fnmatch_lines ([
123
- "django.conf.settings.DATABASES.default.ENGINE: 'sqlite3'"
123
+ " django.conf.settings.DATABASES.default.ENGINE: 'sqlite3'"
124
124
])
125
125
0 commit comments