diff options
Diffstat (limited to 'tests/test_climat2.py')
| -rw-r--r-- | tests/test_climat2.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/test_climat2.py b/tests/test_climat2.py index 17fce82..da790d0 100644 --- a/tests/test_climat2.py +++ b/tests/test_climat2.py | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | import sys | ||
| 1 | import random | 2 | import random |
| 2 | import os | 3 | import os |
| 3 | import shutil | 4 | import shutil |
| @@ -258,7 +259,16 @@ class TestCommandLineParallel(unittest.TestCase): | |||
| 258 | os.remove(path) | 259 | os.remove(path) |
| 259 | 260 | ||
| 260 | def test_different(self): | 261 | def test_different(self): |
| 261 | shutil.copytree('./tests/data/', './tests/data/parallel') | 262 | src = './tests/data/' |
| 263 | dst = './tests/data/parallel' | ||
| 264 | if sys.version_info >= (3, 8): | ||
| 265 | with os.scandir(src) as itr: | ||
| 266 | entries = list(itr) | ||
| 267 | shutil._copytree(entries=entries, src=src, dst=dst, symlinks=False, | ||
| 268 | ignore=None, copy_function=shutil.copy2, | ||
| 269 | ignore_dangling_symlinks=False) | ||
| 270 | else: | ||
| 271 | shutil.copytree(src, dst) | ||
| 262 | 272 | ||
| 263 | proc = subprocess.Popen(mat2_binary + glob.glob('./tests/data/parallel/dirty.*'), | 273 | proc = subprocess.Popen(mat2_binary + glob.glob('./tests/data/parallel/dirty.*'), |
| 264 | stdout=subprocess.PIPE) | 274 | stdout=subprocess.PIPE) |
