Return a tuple that uniquely identifies a test database. This takes into account the special cases of ":memory:" and "" for SQLite since the databases will be distinct despite having the same TEST NAME. See https://www.sqlite.org/inmemorydb.html
(self)
| 112 | os.remove(test_database_name) |
| 113 | |
| 114 | def test_db_signature(self): |
| 115 | """ |
| 116 | Return a tuple that uniquely identifies a test database. |
| 117 | |
| 118 | This takes into account the special cases of ":memory:" and "" for |
| 119 | SQLite since the databases will be distinct despite having the same |
| 120 | TEST NAME. See https://www.sqlite.org/inmemorydb.html |
| 121 | """ |
| 122 | test_database_name = self._get_test_db_name() |
| 123 | sig = [self.connection.settings_dict["NAME"]] |
| 124 | if self.is_in_memory_db(test_database_name): |
| 125 | sig.append(self.connection.alias) |
| 126 | else: |
| 127 | sig.append(test_database_name) |
| 128 | return tuple(sig) |
| 129 | |
| 130 | def setup_worker_connection(self, _worker_id): |
| 131 | settings_dict = self.get_test_db_clone_settings(_worker_id) |
nothing calls this directly
no test coverage detected