Skip to content

Commit

Permalink
Work with setuptools_scm 8.0 (fix #50)
Browse files Browse the repository at this point in the history
Make test_write even less brittle (see also #8, #9, #25) so that it
works with _version.py files generated by at least setuptools_scm 8.0,
7.1, 7.0, and 6.4.

This is required because setuptools_scm 8.0 added a type-checking
comment at the end of the version line.
  • Loading branch information
musicinmybrain committed Sep 22, 2023
1 parent 425d529 commit ddff408
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def test_write(new_project_write):
version_starts = ('version = ', '__version__ = ')
assert any(line.startswith(version_starts) for line in lines)
version_line = next(line for line in lines if line.startswith(version_starts))
assert version_line.endswith(" = '1.2.3'")
assert " = '1.2.3'" in version_line


@pytest.mark.skipif(sys.version_info[0] == 2, reason='Depends on fix in 6.4.0 which is Python 3-only')
Expand Down

0 comments on commit ddff408

Please sign in to comment.