Minor formatting

explicit_write_pps_on_exit
jaredgoldman 2023-02-25 16:09:16 -05:00
parent 85ad23a1e9
commit 3a6fbabaf8
3 changed files with 7 additions and 3 deletions

View File

@ -236,6 +236,7 @@ async def open_ems(
or mode == 'paper'
):
mode = 'paper'
from ._ems import _emsd_main
async with (
# connect to emsd
@ -254,6 +255,7 @@ async def open_ems(
dialogs,
)
),
# open 2-way trade command stream
ctx.open_stream() as trades_stream,
):
@ -264,6 +266,7 @@ async def open_ems(
fqsn,
trades_stream
)
yield (
book,
trades_stream,

View File

@ -126,6 +126,7 @@ def test_paper_trade(open_test_pikerd: AsyncContextManager, delete_testing_dir):
except (NameError, AttributeError):
pass
# Do nothing, message isn't a position
await trio.sleep(1)
# Assert entries are made in both ledger and PPS
if assert_entries or assert_pps or assert_zeroed_pps: