@@ -38,8 +38,8 @@ def test_fail(webtext):
38
38
39
39
40
40
@pytest .mark .parametrize ("when" , ["always" , "failure" , "never" ])
41
- def test_capture_debug_env (testdir , httpserver , monkeypatch , when ):
42
- httpserver .serve_content (content = "<h1>Success!</h1><p>Ё</p>" )
41
+ def test_capture_debug_env (testdir , monkeypatch , when ):
42
+ # httpserver.serve_content(content="<h1>Success!</h1><p>Ё</p>")
43
43
monkeypatch .setenv ("SELENIUM_CAPTURE_DEBUG" , when )
44
44
testdir .makepyfile (
45
45
"""
@@ -53,22 +53,22 @@ def test_capture_debug(webtext):
53
53
)
54
54
result , html = run (testdir )
55
55
if when in ["always" , "failure" ]:
56
- assert URL_LINK .format (httpserver . url ) in html
56
+ assert URL_LINK .format ("http://webserver" ) in html
57
57
assert re .search (SCREENSHOT_LINK_REGEX , html ) is not None
58
58
assert re .search (SCREENSHOT_REGEX , html ) is not None
59
- assert re .search (LOGS_REGEX , html ) is not None
59
+ # assert re.search(LOGS_REGEX, html) is not None
60
60
assert re .search (HTML_REGEX , html ) is not None
61
61
else :
62
- assert URL_LINK .format (httpserver . url ) not in html
62
+ assert URL_LINK .format ("http://webserver" ) not in html
63
63
assert re .search (SCREENSHOT_LINK_REGEX , html ) is None
64
64
assert re .search (SCREENSHOT_REGEX , html ) is None
65
- assert re .search (LOGS_REGEX , html ) is None
65
+ # assert re.search(LOGS_REGEX, html) is None
66
66
assert re .search (HTML_REGEX , html ) is None
67
67
68
68
69
69
@pytest .mark .parametrize ("when" , ["always" , "failure" , "never" ])
70
- def test_capture_debug_config (testdir , httpserver , when ):
71
- httpserver .serve_content (content = "<h1>Success!</h1><p>Ё</p>" )
70
+ def test_capture_debug_config (testdir , when ):
71
+ # httpserver.serve_content(content="<h1>Success!</h1><p>Ё</p>")
72
72
testdir .makefile (
73
73
".ini" ,
74
74
pytest = """
@@ -90,30 +90,30 @@ def test_capture_debug(webtext):
90
90
)
91
91
result , html = run (testdir )
92
92
if when in ["always" , "failure" ]:
93
- assert URL_LINK .format (httpserver . url ) in html
93
+ assert URL_LINK .format ("http://webserver" ) in html
94
94
assert re .search (SCREENSHOT_LINK_REGEX , html ) is not None
95
95
assert re .search (SCREENSHOT_REGEX , html ) is not None
96
- assert re .search (LOGS_REGEX , html ) is not None
96
+ # assert re.search(LOGS_REGEX, html) is not None
97
97
assert re .search (HTML_REGEX , html ) is not None
98
98
else :
99
- assert URL_LINK .format (httpserver . url ) not in html
99
+ assert URL_LINK .format ("http://webserver" ) not in html
100
100
assert re .search (SCREENSHOT_LINK_REGEX , html ) is None
101
101
assert re .search (SCREENSHOT_REGEX , html ) is None
102
- assert re .search (LOGS_REGEX , html ) is None
102
+ # assert re.search(LOGS_REGEX, html) is None
103
103
assert re .search (HTML_REGEX , html ) is None
104
104
105
105
106
106
@pytest .mark .parametrize ("exclude" , ["url" , "screenshot" , "html" , "logs" ])
107
- def test_exclude_debug_env (testdir , httpserver , monkeypatch , exclude ):
108
- httpserver .serve_content (content = "<h1>Success!</h1><p>Ё</p>" )
107
+ def test_exclude_debug_env (testdir , monkeypatch , exclude ):
108
+ # httpserver.serve_content(content="<h1>Success!</h1><p>Ё</p>")
109
109
monkeypatch .setenv ("SELENIUM_EXCLUDE_DEBUG" , exclude )
110
110
result , html = run (testdir )
111
111
assert result .ret
112
112
113
113
if exclude == "url" :
114
- assert URL_LINK .format (httpserver . url ) not in html
114
+ assert URL_LINK .format ("http://webserver" ) not in html
115
115
else :
116
- assert URL_LINK .format (httpserver . url ) in html
116
+ assert URL_LINK .format ("http://webserver" ) in html
117
117
118
118
if exclude == "screenshot" :
119
119
assert re .search (SCREENSHOT_LINK_REGEX , html ) is None
@@ -122,10 +122,10 @@ def test_exclude_debug_env(testdir, httpserver, monkeypatch, exclude):
122
122
assert re .search (SCREENSHOT_LINK_REGEX , html ) is not None
123
123
assert re .search (SCREENSHOT_REGEX , html ) is not None
124
124
125
- if exclude == "logs" :
126
- assert re .search (LOGS_REGEX , html ) is None
127
- else :
128
- assert re .search (LOGS_REGEX , html ) is not None
125
+ # if exclude == "logs":
126
+ # assert re.search(LOGS_REGEX, html) is None
127
+ # else:
128
+ # assert re.search(LOGS_REGEX, html) is not None
129
129
130
130
if exclude == "html" :
131
131
assert re .search (HTML_REGEX , html ) is None
@@ -134,8 +134,8 @@ def test_exclude_debug_env(testdir, httpserver, monkeypatch, exclude):
134
134
135
135
136
136
@pytest .mark .parametrize ("exclude" , ["url" , "screenshot" , "html" , "logs" ])
137
- def test_exclude_debug_config (testdir , httpserver , exclude ):
138
- httpserver .serve_content (content = "<h1>Success!</h1><p>Ё</p>" )
137
+ def test_exclude_debug_config (testdir , exclude ):
138
+ # httpserver.serve_content(content="<h1>Success!</h1><p>Ё</p>")
139
139
testdir .makefile (
140
140
".ini" ,
141
141
pytest = """
@@ -149,9 +149,9 @@ def test_exclude_debug_config(testdir, httpserver, exclude):
149
149
assert result .ret
150
150
151
151
if exclude == "url" :
152
- assert URL_LINK .format (httpserver . url ) not in html
152
+ assert URL_LINK .format ("http://webserver" ) not in html
153
153
else :
154
- assert URL_LINK .format (httpserver . url ) in html
154
+ assert URL_LINK .format ("http://webserver" ) in html
155
155
156
156
if exclude == "screenshot" :
157
157
assert re .search (SCREENSHOT_LINK_REGEX , html ) is None
@@ -160,10 +160,10 @@ def test_exclude_debug_config(testdir, httpserver, exclude):
160
160
assert re .search (SCREENSHOT_LINK_REGEX , html ) is not None
161
161
assert re .search (SCREENSHOT_REGEX , html ) is not None
162
162
163
- if exclude == "logs" :
164
- assert re .search (LOGS_REGEX , html ) is None
165
- else :
166
- assert re .search (LOGS_REGEX , html ) is not None
163
+ # if exclude == "logs":
164
+ # assert re.search(LOGS_REGEX, html) is None
165
+ # else:
166
+ # assert re.search(LOGS_REGEX, html) is not None
167
167
168
168
if exclude == "html" :
169
169
assert re .search (HTML_REGEX , html ) is None
0 commit comments