diff tests/hghaveaddon.py @ 6849:9638dd0fb4ea

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.
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 09 Sep 2024 16:51:00 +0400
parents e41b99cec0c2
children
line wrap: on
line diff
--- 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