Mercurial > repos > davidvanzessen > shm_csr
comparison tests/test_shm_csr.py @ 93:8fcf31272f6e draft
planemo upload commit a43893724cc769bed8a1f19a5b19ec1ba20cb63c
author | rhpvorderman |
---|---|
date | Mon, 06 Mar 2023 11:36:32 +0000 |
parents | cf8ad181628f |
children | 84e9e5c8c101 |
comparison
equal
deleted
inserted
replaced
92:cf8ad181628f | 93:8fcf31272f6e |
---|---|
41 requirements: Element = tool.find("requirements") | 41 requirements: Element = tool.find("requirements") |
42 container = requirements.find("container") | 42 container = requirements.find("container") |
43 return container.text | 43 return container.text |
44 | 44 |
45 | 45 |
46 def ignore_files(src, files): | |
47 "Ignore virtualenv and git directories to prevent massive tmp folders" | |
48 if os.path.basename(src) in (".venv", ".git"): | |
49 return files | |
50 return () | |
51 | |
46 @pytest.fixture(scope="module") | 52 @pytest.fixture(scope="module") |
47 def shm_csr_result(): | 53 def shm_csr_result(): |
48 temp_dir = Path(tempfile.mkdtemp()) | 54 temp_dir = Path(tempfile.mkdtemp()) |
49 tool_dir = temp_dir / "shm_csr" | 55 tool_dir = temp_dir / "shm_csr" |
50 shutil.copytree(GIT_ROOT, tool_dir) | 56 shutil.copytree( |
57 GIT_ROOT, tool_dir, | |
58 # Ignore .venv and .git directories. | |
59 ignore=ignore_files) | |
51 working_dir = temp_dir / "working" | 60 working_dir = temp_dir / "working" |
52 working_dir.mkdir(parents=True) | 61 working_dir.mkdir(parents=True) |
53 output_dir = temp_dir / "outputs" | 62 output_dir = temp_dir / "outputs" |
54 output_dir.mkdir(parents=True) | 63 output_dir.mkdir(parents=True) |
55 wrapper = str(tool_dir / "wrapper.sh") | 64 wrapper = str(tool_dir / "wrapper.sh") |