MCPcopy Index your code
hub / github.com/django-haystack/django-haystack / _cache_is_full

Method _cache_is_full

haystack/query.py:112–124  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

110 return combined
111
112 def _cache_is_full(self):
113 if not self.query.has_run():
114 return False
115
116 if len(self) <= 0:
117 return True
118
119 try:
120 self._result_cache.index(None)
121 return False
122 except ValueError:
123 # No ``None``s found in the results. Check the length of the cache.
124 return len(self._result_cache) > 0
125
126 def _manual_iter(self):
127 # If we're here, our cache isn't fully populated.

Callers 14

__iter__Method · 0.95
_manual_iterMethod · 0.95
__getitem__Method · 0.95
test_cache_is_fullMethod · 0.45
test_cache_is_fullMethod · 0.45
test_cache_is_fullMethod · 0.45
test_cache_is_fullMethod · 0.45
test_cache_is_fullMethod · 0.45

Calls 1

has_runMethod · 0.80

Tested by 11

test_cache_is_fullMethod · 0.36
test_cache_is_fullMethod · 0.36
test_cache_is_fullMethod · 0.36
test_cache_is_fullMethod · 0.36
test_cache_is_fullMethod · 0.36
test_cache_is_fullMethod · 0.36
test_countMethod · 0.36