diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-05-29 22:57:38 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-05-29 22:57:54 -0400 |
commit | 4e1d5f80f0c589b531ec790b195a916e44c91121 (patch) | |
tree | 1f6e0cb601773a837d274c9ff7692db44fd61b80 /source/merge.d | |
parent | c999b73ebb2a04c93fd639b152101464c7fbe9e9 (diff) | |
download | dm-4e1d5f80f0c589b531ec790b195a916e44c91121.tar.gz |
Forcefully uninstall packages; with pip fallback
* write xunit2 data back to the config file
Diffstat (limited to 'source/merge.d')
-rw-r--r-- | source/merge.d | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/source/merge.d b/source/merge.d index 6d78978..96773a6 100644 --- a/source/merge.d +++ b/source/merge.d @@ -177,7 +177,9 @@ auto integration_test(ref Conda conda, string outdir, test_runner_t runner, test string[] tmp = found.split("-"); found = tmp[0]; // Does not need to succeed for all matches - conda.run("remove " ~ found); + if (conda.run("remove --force " ~ found)) { + conda.sh("python -m pip uninstall -y " ~ repo_root.baseName.replace("-", "_")); + } } if (runner.requires) { @@ -195,11 +197,13 @@ auto integration_test(ref Conda conda, string outdir, test_runner_t runner, test } if (runner.program == "pytest" || runner.program == "py.test") { - string testconf = "pytest.ini"; - if (!testconf.exists) { - testconf = "setup.cfg"; + string data; + string pytest_cfg= "pytest.ini"; + if (!pytest_cfg.exists) { + pytest_cfg = "setup.cfg"; } - pytest_xunit2(testconf); + data = pytest_xunit2(pytest_cfg); + File(pytest_cfg, "w+").write(data); } if (conda.sh(runner.program ~ " " ~ runner.args ~ " --basetemp=" ~ basetemp)) { |