Closed cztomczak closed 9 years ago
Hmm. I'm not seeing the same. Would it be possible to isolate the test which is causing it?
pip install -r tests/test_requirements.txt
python -m unittest tests.test_git_fat.{TestCase}.{test_function}
I'm unsure of a way to print the name of each test as it's executed though. :frowning:
It is GeneralTestCase.test_status:
czarek@czarek-T420:~/cyan/ctomczak.git-fat$ python -m unittest tests.test_git_fat.GeneralTestCase.test_status
Updating git-fat files
ERROR:git_fat.py:No section found in /tmp/git-fat-testDg7ckL/fat-test1/.gitfat for backend http
.
----------------------------------------------------------------------
Ran 1 test in 4.282s
OK
It seems the issue is when git config --global init.templatedir is set. After unsetting this option error does not occur enymore. See:
czarek@czarek-T420:~/cyan/ctomczak.git-fat$ git config --global init.templatedir
/home/czarek/.git_template
czarek@czarek-T420:~/cyan/ctomczak.git-fat$ git config --global init.templatedir ""
czarek@czarek-T420:~/cyan/ctomczak.git-fat$ git config --global init.templatedir
czarek@czarek-T420:~/cyan/ctomczak.git-fat$ python -m unittest tests.test_git_fat.GeneralTestCase.test_status
.
----------------------------------------------------------------------
Ran 1 test in 2.837s
OK
Btw. I am working on Windows support, we need it at Cyan. I've already made a lot of progress, but there are still several issues. If I succeed you should see a pull request in a few days.
On Windows I've also had an issue with init.templatedir option. I've resolved it by running tests manually so that main() is run, and in that main I've added calls like unset_templatedir() and restore_templatedir() that are executed before and after running the tests.
Ah this makes sense. I don't generally work with the templatedir
set. Your solution sounds good to me.
This was fixed in pull request #31.
git-fat raises RuntimeError() in the _get_options() function.
Using latest master on Ubuntu 12.04 64-bit.