| 1 | import os |
| 2 | |
| 3 | import doit |
| 4 | from doit.loader import get_module |
| 5 | |
| 6 | |
| 7 | def test_get_initial_workdir(restore_cwd): |
| 8 | initial_wd = os.getcwd() |
| 9 | fileName = os.path.join(os.path.dirname(__file__),"loader_sample.py") |
| 10 | cwd = os.path.normpath(os.path.join(os.path.dirname(__file__), "data")) |
| 11 | assert cwd != initial_wd # make sure test is not too easy |
| 12 | get_module(fileName, cwd) |
| 13 | assert os.getcwd() == cwd, os.getcwd() |
| 14 | assert doit.get_initial_workdir() == initial_wd |
| 15 |