OLD | NEW |
(Empty) | |
| 1 import os |
| 2 import pytest |
| 3 import shutil |
| 4 import subprocess |
| 5 |
| 6 |
| 7 ROOTPATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
| 8 |
| 9 |
| 10 @pytest.fixture(scope='session') |
| 11 def temp_site(tmpdir_factory): |
| 12 out_dir = tmpdir_factory.mktemp('temp_out') |
| 13 site_dir = out_dir.join('test_site').strpath |
| 14 |
| 15 shutil.copytree(os.path.join(ROOTPATH, 'tests', 'test_site'), site_dir) |
| 16 subprocess.check_call(['hg', 'init', site_dir]) |
| 17 subprocess.check_call(['hg', '-R', site_dir, 'commit', '-A', '-m', 'foo']) |
| 18 yield site_dir |
OLD | NEW |