# HG changeset patch # User Anton Shestakov # Date 1725886260 -14400 # Node ID 090834ff8209338026392ff7af1568d09297dba8 # Parent 2cb062b8050cf21fca6000c2c57c7c9dd737f60d tests: add `twine check` to test-check-sdist.t twine can check dist files for various issues (small, I would imagine, since we managed to build the dist files in the first place). Let's make use of this functionality. Not creating a separate test file for twine because we need to build the dist files first before we can check them, and it's already being done in test-check-sdist.t. diff -r 2cb062b8050c -r 090834ff8209 setup.py --- a/setup.py Mon Sep 09 18:46:03 2024 +0400 +++ b/setup.py Mon Sep 09 16:51:00 2024 +0400 @@ -40,6 +40,7 @@ url='https://www.mercurial-scm.org/doc/evolution/', description='Flexible evolution of Mercurial history.', long_description=open(join(dirname(__file__), 'README.rst')).read(), + long_description_content_type='text/x-rst', keywords='hg mercurial', license='GPLv2+', packages=py_packages, diff -r 2cb062b8050c -r 090834ff8209 tests/hghaveaddon.py --- a/tests/hghaveaddon.py Mon Sep 09 18:46:03 2024 +0400 +++ b/tests/hghaveaddon.py Mon Sep 09 16:51:00 2024 +0400 @@ -29,6 +29,11 @@ return hghave.matchoutput('check-manifest --version 2>&1', br'check-manifest version') +@hghave.check("twine", "twine utility for publishing Python packages") +def has_twine(): + return hghave.matchoutput('twine --help 2>&1', + br'usage: twine .*\bcheck\b') + @hghave.check("default-cg3", "changegroup3 by default") def has_default_changegroup3(): from mercurial import configitems diff -r 2cb062b8050c -r 090834ff8209 tests/test-check-sdist.t --- a/tests/test-check-sdist.t Mon Sep 09 18:46:03 2024 +0400 +++ b/tests/test-check-sdist.t Mon Sep 09 16:51:00 2024 +0400 @@ -63,3 +63,8 @@ [1] $ grep -F netlify ../files [1] + +#if twine + $ twine --no-color check * + Checking hg?evolve-*.tar.gz: PASSED (glob) +#endif