Skip to content

Commit

Permalink
not entirely sure what the difference is here, but there's a difference
Browse files Browse the repository at this point in the history
This commit was sponsored by Sean Reifschneider, Moshez, Matt
Campbell, and my other patrons.  If you want to join them, you can
support my work at https://glyph.im/patrons/.
  • Loading branch information
glyph committed Mar 20, 2024
1 parent c3411f9 commit 327ca06
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/dbxs/test/common_adapter_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __new__(
bases = (
()
if bases == tuple([TestCase])
else tuple([TestCase, CommonTests])
else tuple([CommonTests, TestCase])
)
return super().__new__(
cls,
Expand Down
5 changes: 2 additions & 3 deletions src/dbxs/test/test_mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from dataclasses import dataclass
from os import environ
from typing import AsyncIterable
from unittest import skipIf

from twisted.trial.unittest import SynchronousTestCase as TestCase

Expand Down Expand Up @@ -116,10 +117,8 @@ async def _() -> None:
get_event_loop().run_until_complete(_())


@skipIf(cantFindMySQL, cantFindMySQL)
class MySQLTests(CommonTests):
if cantFindMySQL:
skip = cantFindMySQL

def createConnectable(self) -> AsyncConnectable:
return adaptMySQL(configuredConnectAsync)

Expand Down
8 changes: 5 additions & 3 deletions src/dbxs/test/test_pg.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from dataclasses import dataclass
from os import environ
from typing import AsyncIterable
from unittest import skipIf

from twisted.trial.unittest import SynchronousTestCase as TestCase

Expand Down Expand Up @@ -127,10 +128,8 @@ async def _() -> None:
get_event_loop().run_until_complete(_())


@skipIf(cantFindPG, cantFindPG)
class PGTests(CommonTests):
if cantFindPG:
skip = cantFindPG

def createConnectable(self) -> AsyncConnectable:
return adaptPostgreSQL(AsyncConnection.connect)

Expand All @@ -142,3 +141,6 @@ def stringType(self) -> object:

def valuesSQL(self) -> str:
return "select * from (values (1, '2')) as named(firstcol, secondcol)"


# print(PGTests.skip)

0 comments on commit 327ca06

Please sign in to comment.