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

Delta Between Two Patch Sets: tests/conftest.py

Issue 29912588: Issue 7019 - [CMS] Refactor `test_server.py` (Closed)
Left Patch Set: Updated exception tests. Removed duplicates from ignores Created Oct. 18, 2018, 4:09 p.m.
Right Patch Set: Addressed docstring nit Created Oct. 29, 2018, 11 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « cms/bin/test_server.py ('k') | tests/test_dynamic_server.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 from __future__ import unicode_literals 1 from __future__ import unicode_literals
2 2
3 import os 3 import os
4 import pytest 4 import pytest
5 import shutil 5 import shutil
6 6
7 pytest_plugins = [ 7 pytest_plugins = [
8 'tests.xtm_conftest', 8 'tests.xtm_conftest',
9 ] 9 ]
10 10
(...skipping 11 matching lines...) Expand all
22 shutil.copytree(os.path.join(ROOTPATH, 'tests', 'test_site'), site_dir) 22 shutil.copytree(os.path.join(ROOTPATH, 'tests', 'test_site'), site_dir)
23 yield site_dir 23 yield site_dir
24 24
25 25
26 @pytest.fixture(scope='session') 26 @pytest.fixture(scope='session')
27 def temp_site_with_conflicts(tmpdir_factory): 27 def temp_site_with_conflicts(tmpdir_factory):
28 out_dir = tmpdir_factory.mktemp('temp_out_conflicts') 28 out_dir = tmpdir_factory.mktemp('temp_out_conflicts')
29 site_dir = out_dir.join('test_site').strpath 29 site_dir = out_dir.join('test_site').strpath
30 30
31 shutil.copytree(os.path.join(ROOTPATH, 'tests', 'test_site'), site_dir) 31 shutil.copytree(os.path.join(ROOTPATH, 'tests', 'test_site'), site_dir)
32 with open(os.path.join(site_dir, 'locales', 'en', 'translate'), 'w') \ 32 translate_file = os.path.join(site_dir, 'locales', 'en', 'translate')
Vasily Kuznetsov 2018/10/22 14:36:47 Nit: maybe construct the path in a separate line t
Tudor Avram 2018/10/23 16:44:34 Done.
33 as f: 33 with open(translate_file, 'w') as f:
34 f.write('Page with conflicts') 34 f.write('Page with conflicts')
35 35
36 yield site_dir 36 yield site_dir
LEFTRIGHT

Powered by Google App Engine
This is Rietveld