diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-05-31 23:06:30 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-05-31 23:06:30 -0400 |
commit | 1fe1d505a63b1eced98523c0cca7603ab165218f (patch) | |
tree | b9222e01c1f32176e931a9abe56d3ab9dd68b6e9 | |
parent | 2e0a52ce081b5292717d7779fba3e56d0caf5170 (diff) | |
download | dm-1fe1d505a63b1eced98523c0cca7603ab165218f.tar.gz |
Bugfix: Create setup.cfg|pytest.ini if does not exist
-rw-r--r-- | source/util.d | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/util.d b/source/util.d index 8f2ad8d..02c74b8 100644 --- a/source/util.d +++ b/source/util.d @@ -102,8 +102,6 @@ string safe_install(string specs) { string pytest_xunit2(string filename) { - string _data = readText(filename); - string data; string result; bool inject = false; bool inject_wait = false; @@ -112,6 +110,12 @@ string pytest_xunit2(string filename) { string section; immutable string key = "junit_family"; immutable string cfgitem = key ~ " = xunit2"; + string _data = readText(filename); + string data; + + if (!filename.exists) { + File(filename, "w+").write(""); + } if (filename.baseName == "setup.cfg") { section = "[tool:pytest]"; |