@@ -47,10 +47,17 @@ def test_return_all_fields(self, impactor: Impactor):
4747
4848 def test_quantum_information_search (self , impactor ):
4949 expected_results = [
50- {"journal" : "Innovation" , "factor" : 33.2 , "score" : 70 },
51- {"journal" : "InfoMat" , "factor" : 22.7 , "score" : 71 },
52- {"journal" : "Information Fusion" , "factor" : 14.7 , "score" : 71 },
53- {"journal" : "PRX Quantum" , "factor" : 9.3 , "score" : 78 },
50+ {"journal" : "Innovation" , "factor" : 25.7 , "score" : 70 },
51+ {"journal" : "Exploration" , "factor" : 22.5 , "score" : 74 },
52+ {"journal" : "InfoMat" , "factor" : 22.3 , "score" : 71 },
53+ {"journal" : "Information Fusion" , "factor" : 15.5 , "score" : 71 },
54+ {"journal" : "PRX Quantum" , "factor" : 11.0 , "score" : 78 },
55+ {
56+ "journal" : "International Journal of Applied Earth Observation and Geoinformation" ,
57+ "factor" : 8.6 ,
58+ "score" : 76 ,
59+ },
60+ {"journal" : "npj Quantum Information" , "factor" : 8.3 , "score" : 95 },
5461 ]
5562
5663 results = impactor .search (
@@ -70,6 +77,18 @@ def test_quantum_information_search(self, impactor):
7077 expected ["score" ] == actual ["score" ]
7178 ), f"Score does not match for { expected ['journal' ]} "
7279
80+ results = impactor .search (
81+ "Quantum information" , threshold = 90 , sort_by = "score" , min_impact = 2
82+ )
83+ expected_results = [
84+ {"journal" : "Quantum" , "factor" : 5.4 , "score" : 100 },
85+ {"journal" : "npj Quantum Information" , "factor" : 8.3 , "score" : 95 },
86+ {"journal" : "Information" , "factor" : 2.9 , "score" : 95 },
87+ {"journal" : "Quantum Information Processing" , "factor" : 2.2 , "score" : 95 },
88+ ]
89+ assert len (results ) == len (expected_results ), "Number of results does not match"
90+ assert results == expected_results
91+
7392 def test_type_error (self , impactor : Impactor ):
7493 with pytest .raises (TypeError ):
7594 impactor .search (123 , threshold = 99 ) # query is not a str
0 commit comments