diff --git a/testing/test_mercurial.py b/testing/test_mercurial.py index 22481623..af085769 100644 --- a/testing/test_mercurial.py +++ b/testing/test_mercurial.py @@ -115,12 +115,22 @@ def test_version_from_archival(wd: WorkDir) -> None: # entrypoints are unordered, # cleaning the wd ensure this test won't break randomly wd.cwd.joinpath(".hg").rename(wd.cwd / ".nothg") - wd.write(".hg_archival.txt", "node: 000000000000\n" "tag: 0.1\n") + wd.write( + ".hg_archival.txt", + """\ +node: 000000000000 +tag: 0.1 +""", + ) assert wd.get_version() == "0.1" wd.write( ".hg_archival.txt", - "node: 000000000000\n" "latesttag: 0.1\n" "latesttagdistance: 3\n", + """\ +node: 000000000000 +latesttag: 0.1 +latesttagdistance: 3 +""", ) assert wd.get_version() == "0.2.dev3+h000000000000" diff --git a/testing/test_regressions.py b/testing/test_regressions.py index df2fb2fd..d523f60c 100644 --- a/testing/test_regressions.py +++ b/testing/test_regressions.py @@ -35,7 +35,10 @@ def test_pkginfo_noscmroot(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> N tmp_path.joinpath(".git").mkdir() p.joinpath("setup.py").write_text( - "from setuptools import setup;" 'setup(use_scm_version={"root": ".."})', + """\ +from setuptools import setup +setup(use_scm_version={"root": ".."}) +""", encoding="utf-8", )