feat: add basic support for progress indicators
This commit is contained in:
parent
110ff69d6d
commit
4b9db13b8f
9 changed files with 248 additions and 1 deletions
|
@ -12,6 +12,7 @@ import pytest
|
|||
|
||||
import wuttjamaican.enum
|
||||
from wuttjamaican import app
|
||||
from wuttjamaican.progress import ProgressBase
|
||||
from wuttjamaican.conf import WuttaConfig
|
||||
from wuttjamaican.util import UNSPECIFIED
|
||||
|
||||
|
@ -315,6 +316,19 @@ class TestAppHandler(TestCase):
|
|||
uuid = self.app.make_uuid()
|
||||
self.assertEqual(len(uuid), 32)
|
||||
|
||||
def test_progress_loop(self):
|
||||
|
||||
def act(obj, i):
|
||||
pass
|
||||
|
||||
# with progress
|
||||
self.app.progress_loop(act, [1, 2, 3], ProgressBase,
|
||||
message="whatever")
|
||||
|
||||
# without progress
|
||||
self.app.progress_loop(act, [1, 2, 3], None,
|
||||
message="whatever")
|
||||
|
||||
def test_get_session(self):
|
||||
try:
|
||||
import sqlalchemy as sa
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue