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

View File

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