Attempt to use coverage to quantify how many of the CONDITIONAL_NAMES we really use (#3763)
* Attempt to use coverage to quantify how many of the CONDITIONAL_NAMES we really use
* rewrite file to improve coverage
* Write it this way so we can use line coverage
* lost this one :-(
* fix comment and flake8
* update the docs as well
* flake8
diff --git a/docs/development/c-bindings.rst b/docs/development/c-bindings.rst
index 43ec4d8..8a9bb6d 100644
--- a/docs/development/c-bindings.rst
+++ b/docs/development/c-bindings.rst
@@ -167,15 +167,22 @@
Finally, add an entry to ``CONDITIONAL_NAMES`` with all of the things
you want to conditionally export::
- CONDITIONAL_NAMES = {
- ...
- "Cryptography_HAS_QUANTUM_TRANSMOGRIFICATION": [
+ def cryptography_has_quantum_transmogrification():
+ return [
"QM_TRANSMOGRIFICATION_ALIGNMENT_LEFT",
"QM_TRANSMOGRIFICATION_ALIGNMENT_RIGHT",
- "QM_transmogrify"
+ "QM_transmogrify",
]
+
+
+ CONDITIONAL_NAMES = {
+ ...
+ "Cryptography_HAS_QUANTUM_TRANSMOGRIFICATION": (
+ cryptography_has_quantum_transmogrification
+ ),
}
+
Caveats
~~~~~~~