diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-10-17 07:38:07 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-10-17 07:38:33 -0400 |
commit | 9c4de15ed28f495a5e5f9da6fb39e39cc5863746 (patch) | |
tree | e22808f5b543a1b2cc2c7572a9fe70aa3908e85b /tests/test_html.py | |
parent | efde114f079cb0c0aad78e192843bf51e8951c61 (diff) | |
download | python-coveragepy-git-9c4de15ed28f495a5e5f9da6fb39e39cc5863746.tar.gz |
test: improve this one html test
Diffstat (limited to 'tests/test_html.py')
-rw-r--r-- | tests/test_html.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_html.py b/tests/test_html.py index 7368cdb1..77fa65a6 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -894,15 +894,15 @@ assert len(math) == 18 """) with change_dir("src"): - sys.path.insert(0, "") # pytest sometimes has this, sometimes not!? sys.path.insert(0, "../othersrc") cov = coverage.Coverage(include=["./*", "../othersrc/*"]) self.start_import_stop(cov, "here") cov.html_report(directory="../out/other") # Different platforms will name the "other" file differently. Rename it - for p in glob.glob("out/other/*_other_py.html"): - os.rename(p, "out/other/blah_blah_other_py.html") + actual_file = list(glob.glob("out/other/*_other_py.html")) + assert len(actual_file) == 1 + os.rename(actual_file[0], "out/other/blah_blah_other_py.html") compare_html( gold_path("html/other"), "out/other", |