def test_limit_results_none(self):
        """if env var isn't set or is None"""
        vocab_source = "https://www.mit.edu/~ecprice/wordlist.10000"

        vocab = requests.get(vocab_source).text.splitlines()

        self.add_documents(
            config=self.config, add_docs_params=AddDocsParams(index_name=self.index_name_1,
                                                              docs=[{"Title": "a " + (
                                                                  " ".join(random.choices(population=vocab, k=25)))}
                                                                    for _ in range(700)], auto_refresh=False,
                                                              device="cpu")
        )
        tensor_search.refresh_index(config=self.config, index_name=self.index_name_1)

        for search_method in (SearchMethod.LEXICAL, SearchMethod.TENSOR):
            for mock_environ in [dict(),
                                 {EnvVars.MARQO_MAX_RETRIEVABLE_DOCS: ''}]:
                @mock.patch.dict(os.environ, {**os.environ, **mock_environ})
                def run():
                    lim = 500
                    half_search = tensor_search.search(
                        search_method=search_method,
                        config=self.config, index_name=self.index_name_1, text='a', result_count=lim)
                    assert half_search['limit'] == lim
                    assert len(half_search['hits']) == lim
                    return True

                assert run()
if env var isn't set or is None
tests/integ_tests/tensor_search/test_search.py