-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:webis-de/ir_axioms
- Loading branch information
Showing
10 changed files
with
71 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import unittest | ||
|
||
import pyterrier as pt | ||
if not pt.started(): | ||
pt.init() | ||
|
||
from ir_axioms.backend.pyterrier import TerrierIndexContext | ||
|
||
|
||
class TestStringRepresentations(unittest.TestCase): | ||
def test_string_representation_of_terrier_index_context_01(self): | ||
# Needed for caching | ||
expected = 'TerrierIndexContext(index_location)' | ||
actual = str(TerrierIndexContext('index_location')) | ||
|
||
self.assertEqual(expected, actual) | ||
|
||
def test_string_representation_of_terrier_index_context_02(self): | ||
# Needed for caching | ||
expected = 'TerrierIndexContext(index_location)' | ||
actual = str(TerrierIndexContext('ignore/absolute/path/index_location')) | ||
|
||
self.assertEqual(expected, actual) | ||
|
||
def test_string_representation_of_terrier_index_context_03(self): | ||
# Needed for caching | ||
expected = 'TerrierIndexContext(index_location)' | ||
actual = str(TerrierIndexContext('ignore/absolute/path/index_location ignore suffix')) | ||
|
||
self.assertEqual(expected, actual) |