Skip to content

Commit acdeff6

Browse files
committed
tests: add relative link test
1 parent c9a7db7 commit acdeff6

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

tests/test_links.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import subprocess
2+
import sys
3+
import unittest
4+
from pathlib import Path
5+
6+
ROOT = Path(__file__).resolve().parents[1]
7+
8+
9+
class LinkTests(unittest.TestCase):
10+
def test_relative_links_are_valid(self):
11+
result = subprocess.run(
12+
[sys.executable, str(ROOT / 'scripts' / 'check_links.py')],
13+
cwd=ROOT,
14+
text=True,
15+
capture_output=True,
16+
)
17+
self.assertEqual(result.returncode, 0, result.stdout + result.stderr)
18+
19+
20+
if __name__ == '__main__':
21+
unittest.main()

0 commit comments

Comments
 (0)