Skip to content

Commit

Permalink
refactor: cleanup + simpler imports
Browse files Browse the repository at this point in the history
  • Loading branch information
kraanzu committed Sep 17, 2024
1 parent 336868d commit 87f3e53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
18 changes: 1 addition & 17 deletions tests/test_ui/_base.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
from dooit.ui.tui import Dooit

TEMP_CONN = "sqlite:///:memory:"
base_app = Dooit(connection_string=TEMP_CONN)


# class UITestBase(IsolatedAsyncioTestCase):
# pilot: Pilot
#
# async def asyncSetupClass(self):
# async with Dooit(connection_string=TEMP_CONN).run_test() as pilot:
# self.pilot = pilot
#
# async def asyncSetup(self):
# async with Dooit(connection_string=TEMP_CONN).run_test() as pilot:
# self.pilot = pilot
#
# def tearDown(self) -> None:
# manager.session.rollback()
# manager.session.close()
run_pilot = Dooit(connection_string=TEMP_CONN).run_test
7 changes: 2 additions & 5 deletions tests/test_ui/test_startup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
from textual.pilot import Pilot
from dooit.ui.tui import Dooit
from dooit.ui.widgets.trees import WorkspacesTree
TEMP_CONN = "sqlite:///:memory:"
from tests.test_ui._base import run_pilot


async def test_startup():
async with Dooit(connection_string=TEMP_CONN).run_test() as pilot:
async with run_pilot() as pilot:
assert pilot.app.is_running

0 comments on commit 87f3e53

Please sign in to comment.