diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-05-11 15:59:07 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-05-11 15:59:07 -0400 |
commit | c2fb852e011c898f1ebf2eb8cca16a8b6265fb8f (patch) | |
tree | 7d3b2cfa4951ab70e1c2673706e6e99a21b9ca2a /tests/test_merge.py | |
parent | 1906a2dc64848803e0dc74cbd4a131874773d771 (diff) | |
download | delivery_merge-c2fb852e011c898f1ebf2eb8cca16a8b6265fb8f.tar.gz |
More force_xunit2 cases
Diffstat (limited to 'tests/test_merge.py')
-rw-r--r-- | tests/test_merge.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/test_merge.py b/tests/test_merge.py index 469bd4d..f604348 100644 --- a/tests/test_merge.py +++ b/tests/test_merge.py @@ -134,8 +134,23 @@ class TestMerge: contents = open(result).read() assert contents.startswith('<?xml') and contents.endswith('</testsuite>') - def test_force_xunit2(self): + def test_force_xunit2_no_config(self): assert not os.path.exists('pytest.ini') merge.force_xunit2() assert os.path.exists('pytest.ini') assert 'junit_family = xunit2' in open('pytest.ini').read() + + def test_force_xunit2_no_setup(self): + open('pytest.ini', 'w+').write('') + merge.force_xunit2() + assert not os.path.exists('setup.cfg') + assert os.path.exists('pytest.ini') + assert 'junit_family = xunit2' in open('pytest.ini').read() + + def test_force_xunit2_no_pytest(self): + open('setup.cfg', 'w+').write('') + merge.force_xunit2() + assert not os.path.exists('pytest.ini') + assert os.path.exists('setup.cfg') + assert 'junit_family = xunit2' in open('setup.cfg').read() + |