Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Remove dead code in tests/storage/test_database.py #12197

Merged
merged 1 commit into from
Mar 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove dead code in tests/storage/test_database.py
Signed-off-by: Sean Quah <[email protected]>
Sean Quah committed Mar 9, 2022
commit b7df1e44b41080eeeda863778fead1b3faca172e
1 change: 1 addition & 0 deletions changelog.d/12197.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove some dead code.
16 changes: 0 additions & 16 deletions tests/storage/test_database.py
Original file line number Diff line number Diff line change
@@ -13,26 +13,10 @@
# limitations under the License.

from synapse.storage.database import make_tuple_comparison_clause
from synapse.storage.engines import BaseDatabaseEngine

from tests import unittest


def _stub_db_engine(**kwargs) -> BaseDatabaseEngine:
# returns a DatabaseEngine, circumventing the abc mechanism
# any kwargs are set as attributes on the class before instantiating it
t = type(
"TestBaseDatabaseEngine",
(BaseDatabaseEngine,),
dict(BaseDatabaseEngine.__dict__),
)
# defeat the abc mechanism
t.__abstractmethods__ = set()
for k, v in kwargs.items():
setattr(t, k, v)
return t(None, None)


class TupleComparisonClauseTestCase(unittest.TestCase):
def test_native_tuple_comparison(self):
clause, args = make_tuple_comparison_clause([("a", 1), ("b", 2)])