mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
adding back files to be reviewed
This commit is contained in:
parent
ae28233110
commit
bc09d1ef55
1244 changed files with 301904 additions and 0 deletions
15
tests/__init__.py
Normal file
15
tests/__init__.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from contextlib import contextmanager
|
||||
import os
|
||||
import tempfile
|
||||
|
||||
|
||||
@contextmanager
|
||||
def cdtemp():
|
||||
"""Context manager to change to/return from a tmpdir."""
|
||||
with tempfile.TemporaryDirectory() as tmpdir:
|
||||
cwd = os.getcwd()
|
||||
try:
|
||||
os.chdir(tmpdir)
|
||||
yield
|
||||
finally:
|
||||
os.chdir(cwd)
|
||||
Loading…
Add table
Add a link
Reference in a new issue