@@ -15,9 +15,9 @@ def setUp(self):
1515 """Set up test fixtures"""
1616 self .medulla_id = 'FBbt_00003748'
1717 # Expected count based on VFB data (as of test creation)
18- # Allowing tolerance for data updates
19- self .expected_count = 471
20- self .count_tolerance = 5 # Allow ±5 for data updates
18+ # Data can grow over time, so we test for minimum expected count
19+ self .expected_count = 470 # Minimum expected count (actual was 472)
20+ self .count_tolerance = 5 # Allow some tolerance for variations
2121
2222 def test_neurons_part_here_returns_results (self ):
2323 """Test that NeuronsPartHere query returns results for medulla"""
@@ -49,23 +49,22 @@ def test_neurons_part_here_result_count(self):
4949 )
5050
5151 actual_count = len (results_df )
52- count_diff = abs ( actual_count - self .expected_count )
52+ count_diff = actual_count - self .expected_count
5353
54- print (f"Expected: { self .expected_count } results" )
54+ print (f"Expected: at least { self .expected_count } results" )
5555 print (f"Actual: { actual_count } results" )
56- print (f"Difference: { count_diff } " )
5756
58- # Allow some tolerance for data updates
59- self .assertLessEqual (
60- count_diff ,
61- self .count_tolerance ,
62- f"Result count { actual_count } differs from expected { self . expected_count } by more than { self .count_tolerance } "
57+ # Data can grow over time, so we require at least the expected minimum
58+ self .assertGreaterEqual (
59+ actual_count ,
60+ self .expected_count ,
61+ f"Result count { actual_count } is less than expected minimum { self .expected_count } "
6362 )
6463
6564 if count_diff > 0 :
66- print (f"⚠ Count differs by { count_diff } (within tolerance of { self . count_tolerance } )" )
65+ print (f"✓ Count increased by { count_diff } (data growth )" )
6766 else :
68- print (f"✓ Exact count match : { actual_count } " )
67+ print (f"✓ Minimum count met : { actual_count } " )
6968
7069 def test_neurons_part_here_result_structure (self ):
7170 """Test that results have the expected structure with required columns"""
0 commit comments