Skip to content

Additional validation. #582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 16 additions & 0 deletions test/validate_pids.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,26 @@

ok = True

for index in vid_1209.glob("*/*"):
if index.name != "index.md":
ok = False
print("Invalid file:", index)


for index in Path("org").glob("*/*"):
if index.name != "index.md":
ok = False
print("Invalid file:", index)

for pid in vid_1209.iterdir():
pid = pid.name
if pid == "index.md":
continue
try:
int(pid, 16)
except ValueError:
ok = False
print("PID " + pid + " not valid hex. Must be 4 characters 0-9 or A-F.")
if pid.upper() != pid:
ok = False
print("PID must be upper case:", pid)
Expand Down