jiahuili430 commented on code in PR #5341:
URL: https://github.com/apache/couchdb/pull/5341#discussion_r1858801200


##########
src/mango/test/16-index-selectors-test.py:
##########
@@ -189,6 +189,7 @@ def 
test_uses_partial_index_with_non_indexable_selector(self):
 @unittest.skipUnless(mango.has_text_service(), "requires text service")
 class IndexSelectorText(mango.DbPerClass):
     def setUp(self):
+        self.db = 
mango.Database(f"{mango.random_db_name()}_{str(self).split()[0]}")

Review Comment:
   Thank you all for the suggestions and comments.
   - `recreate()` is used in `classmethod` `setUpClass()`, such as 
`UserDocsTests`, `NumStringTests`, etc., which is difficult to modify.
   - `recreat_random()`, simple solution, but deleting the old database becomes 
a problem.
   - So finally decided to use `setUp()` and `tearDown()`. Use a boolean 
variable `db_per_test` to control whether to use class db or create/delete a 
custom db for each test.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to