Skip to content
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

TST: Make test_linking_naisc_executable deterministic on CI #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
5 changes: 3 additions & 2 deletions tests/_mock_naisc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
file1, file2 = sys.argv[1:3]
text1 = open(file1).read()
text2 = open(file2).read()
sense_id1 = re.search(r':sense <(.+?)>', text1).group(1) # type: ignore
sense_id2 = re.search(r':sense <(.+?)>', text2).group(1) # type: ignore
# Find 'cat-n-1' sense in both texts
sense_id1 = re.search(r':sense <(.+?-n-1)>', text1).group(1) # type: ignore
sense_id2 = re.search(r':sense <(.+?-n-1)>', text2).group(1) # type: ignore
print(f'<{file1}#{sense_id1}> '
f'<http://www.w3.org/2004/02/skos/core#exactMatch> '
f'<{file2}#{sense_id2}> . # 0.8000')