annotate tests/hghaveaddon.py @ 5533:044ce00dfa88 stable

tests: use the modern config setting to enable evolution in topic tests When adding `hg pick --config extensions.evolve=` to test-topic-dest.t to investigate issue6406, it failed with `abort: unknown command 'pick'`. This is a manifestation of issue6039. I made several attempts at determining the root cause, and while I'm still worried about *why* a config setting can cause the extension to fail to fully initialize, there are some topic bugs to cleanup and I don't feel like spending more time on this.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 05 Sep 2020 00:07:01 -0400
parents 398c7031177a
children f2139537c2be
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2959
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
1 import hghave
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
2
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
3 @hghave.check("docgraph-ext", "Extension to generate graph from repository")
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
4 def docgraph():
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
5 try:
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
6 import hgext.docgraph
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
7 hgext.docgraph.cmdtable # trigger import
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
8 except ImportError:
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
9 try:
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
10 import hgext3rd.docgraph
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
11 hgext3rd.docgraph.cmdtable # trigger import
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
12 except ImportError:
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
13 return False
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents:
diff changeset
14 return True
5362
398c7031177a tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents: 2959
diff changeset
15
398c7031177a tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents: 2959
diff changeset
16 @hghave.check("flake8", "Flake8 python linter")
398c7031177a tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents: 2959
diff changeset
17 def has_flake8():
398c7031177a tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents: 2959
diff changeset
18 try:
398c7031177a tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents: 2959
diff changeset
19 import flake8
398c7031177a tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents: 2959
diff changeset
20
398c7031177a tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents: 2959
diff changeset
21 flake8.__version__
398c7031177a tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents: 2959
diff changeset
22 except ImportError:
398c7031177a tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents: 2959
diff changeset
23 return False
398c7031177a tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents: 2959
diff changeset
24 else:
398c7031177a tests: use hghaveaddon.py to check for flake8
Anton Shestakov <av6@dwimlabs.net>
parents: 2959
diff changeset
25 return True