Skip to content

Commit

Permalink
add script to check the expected result count against the actual result
Browse files Browse the repository at this point in the history
  • Loading branch information
Abbe98 committed Oct 22, 2024
1 parent 35c6a10 commit 046c6e8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 8 additions & 0 deletions jargon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -249,3 +249,11 @@ yaml
yml
za
zealand
usr
env
os
www
urlencoded
iglob
RequestException
str
6 changes: 2 additions & 4 deletions scripts/check-expected-results-count.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python3

import glob
import os
import re

import requests
Expand All @@ -28,9 +27,8 @@ def execute_sparql_query(endpoint, query):


def verify_result_counts(folder_path, endpoint):
for filename in glob.iglob(folder_path + "**/*.rq", recursive=True):
file_path = os.path.join(folder_path, filename)
with open(file_path, "r") as file:
for filename in glob.iglob(folder_path + "**/**/*.rq", recursive=True):
with open(filename, "r") as file:
content = file.read()
expected_count = get_expected_count(content)
if expected_count is not None:
Expand Down

0 comments on commit 046c6e8

Please sign in to comment.