moe-serifu-agent icon indicating copy to clipboard operation
moe-serifu-agent copied to clipboard

Running unit tests causes config file under SCM to be modified

Open dekarrin opened this issue 6 years ago • 5 comments

Describe the bug When running unit tests, the config unit tests causes the tests/test.cfg file to be written to. The contents are the same, but as a failing test might not write the correct file back out, it's possible that on a failed test that git will pick changes and then have it be included in modified source files.

In particular, on Windows, due to python auto-translating line endings, the output tests/test.cfg actually does have different line endings then the original, so it is in particular making it difficult to run unit tests on windows.

To Reproduce Steps to reproduce the behavior:

  1. On Windows:
  2. Run the unit tests
  3. Execute git status
  4. Note that git shows the file test/tests.cfg to have been modified.

Expected behavior Running unit tests should not write to files that are under source control.

Desktop (please complete the following information):

  • OS: Windows 10 Pro

dekarrin avatar Jan 05 '19 18:01 dekarrin