# HG changeset patch # User Anton Shestakov # Date 1725886260 -14400 # Node ID 9638dd0fb4eaea9367857850d6a200fda590eafd # Parent e823d9117a680157c7a2c0bb37dd05ce93cb8318 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 e823d9117a68 -r 9638dd0fb4ea setup.py --- a/setup.py Mon Sep 16 17:22:23 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 e823d9117a68 -r 9638dd0fb4ea tests/hghaveaddon.py --- a/tests/hghaveaddon.py Mon Sep 16 17:22:23 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 e823d9117a68 -r 9638dd0fb4ea tests/test-check-sdist.t --- a/tests/test-check-sdist.t Mon Sep 16 17:22:23 2024 +0400 +++ b/tests/test-check-sdist.t Mon Sep 09 16:51:00 2024 +0400 @@ -60,3 +60,8 @@ [1] $ grep -F netlify ../files [1] + +#if twine + $ twine --no-color check * + Checking hg?evolve-*.tar.gz: PASSED (glob) +#endif