mirror of
https://github.com/ChristianLight/tutor.git
synced 2025-01-25 22:18:24 +00:00
fix: unit test on github's macOs action runner
Somehow, the tmp directory is a symlink on github.
This commit is contained in:
parent
3b6d2404e5
commit
429d528d64
@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
import pathlib
|
||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
@ -27,6 +28,8 @@ class LocalTests(unittest.TestCase, TestCommandMixin):
|
|||||||
def test_copyfrom(self) -> None:
|
def test_copyfrom(self) -> None:
|
||||||
with temporary_root() as root:
|
with temporary_root() as root:
|
||||||
with tempfile.TemporaryDirectory() as directory:
|
with tempfile.TemporaryDirectory() as directory:
|
||||||
|
# resolve actual path, just like click.Path does it.
|
||||||
|
directory = os.fsdecode(pathlib.Path(directory).resolve())
|
||||||
with patch("tutor.utils.docker_compose") as mock_docker_compose:
|
with patch("tutor.utils.docker_compose") as mock_docker_compose:
|
||||||
self.invoke_in_root(root, ["config", "save"])
|
self.invoke_in_root(root, ["config", "save"])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user