summaryrefslogtreecommitdiff
path: root/tools/ci/test_all_newsfragments_used.py
blob: c2e03154945d01770f3c765e0515be198c73aea5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python3

import sys
import toml
import os

path = toml.load("pyproject.toml")["tool"]["towncrier"]["directory"]

fragments = os.listdir(path)
fragments.remove("README.rst")
fragments.remove("template.rst")

if fragments:
    print("The following files were not found by towncrier:")
    print("    " + "    \n".join(fragments))
    sys.exit(1)