Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: tests/test_page_outputs.py

Issue 29857615: Issue 6867 - Fix pytest 3.7.1 mock regression (Closed) Base URL: https://hg.adblockplus.org/cms
Patch Set: Created Aug. 16, 2018, 7:38 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tox.ini » ('j') | tox.ini » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/test_page_outputs.py
===================================================================
--- a/tests/test_page_outputs.py
+++ b/tests/test_page_outputs.py
@@ -26,23 +26,22 @@
del outputs[filename]
return outputs.items()
static_expected_outputs = get_expected_outputs('static')
dynamic_expected_outputs = get_expected_outputs('dynamic')
-@mock.patch('cms.sources.FileSource.version', 1)
@pytest.fixture(scope='session')
def static_output(request, temp_site):
static_out_path = os.path.join(temp_site, 'static_out')
sys.argv = ['filler', temp_site, static_out_path]
-
- runpy.run_module('cms.bin.generate_static_pages', run_name='__main__')
+ with mock.patch('cms.sources.FileSource.version', 1):
+ runpy.run_module('cms.bin.generate_static_pages', run_name='__main__')
return static_out_path
@pytest.fixture(scope='module')
def dynamic_server(temp_site):
with run_test_server(temp_site) as ts:
yield ts
« no previous file with comments | « no previous file | tox.ini » ('j') | tox.ini » ('J')

Powered by Google App Engine
This is Rietveld