From a7dff4dfee1de0619b27b8d41e218a2c63ceca36 Mon Sep 17 00:00:00 2001 From: James Knight Date: Sun, 6 Oct 2024 20:16:41 -0400 Subject: [PATCH] tests-sample-linkcode: adding sample set Signed-off-by: James Knight --- tests/sample-sets/linkcode/conf.py | 10 ++++++++++ tests/sample-sets/linkcode/index.rst | 8 ++++++++ tests/sample-sets/linkcode/tox.ini | 11 +++++++++++ 3 files changed, 29 insertions(+) create mode 100644 tests/sample-sets/linkcode/conf.py create mode 100644 tests/sample-sets/linkcode/index.rst create mode 100644 tests/sample-sets/linkcode/tox.ini diff --git a/tests/sample-sets/linkcode/conf.py b/tests/sample-sets/linkcode/conf.py new file mode 100644 index 00000000..76492f57 --- /dev/null +++ b/tests/sample-sets/linkcode/conf.py @@ -0,0 +1,10 @@ +extensions = [ + 'sphinxcontrib.confluencebuilder', + 'sphinx.ext.linkcode', +] + +def linkcode_resolve(domain, info): + name = info.get('fullname', None) + if not name: + return None + return f'https://example.org/src/{name}' diff --git a/tests/sample-sets/linkcode/index.rst b/tests/sample-sets/linkcode/index.rst new file mode 100644 index 00000000..ba35a77d --- /dev/null +++ b/tests/sample-sets/linkcode/index.rst @@ -0,0 +1,8 @@ +linkcode +======== + +.. module:: example + +.. class:: ExampleModule + + This is an example. diff --git a/tests/sample-sets/linkcode/tox.ini b/tests/sample-sets/linkcode/tox.ini new file mode 100644 index 00000000..c2ccb2cd --- /dev/null +++ b/tests/sample-sets/linkcode/tox.ini @@ -0,0 +1,11 @@ +[tox] +package_root={toxinidir}{/}..{/}..{/}.. + +[testenv] +commands = + {envpython} -m tests.test_sample {posargs} +setenv = + PYTHONDONTWRITEBYTECODE=1 + TOX_INI_DIR={toxinidir} +passenv = * +use_develop = true