pikers / piker

(e2e) foss trading for non-tinas
GNU Affero General Public License v3.0
102 stars 17 forks source link

`loglevel` to `open_test_pikerd()` via `--ll <level>` flag #465

Closed goodboy closed 1 year ago

goodboy commented 1 year ago

Like it sounds, this jigs our test harness to include:

Also included are some minor tweaks to remove some warnings from the summary, mostly to do with tractor API deprecations, and some moving of old conftest fixture code to the test_questrade module.

goodboy commented 1 year ago

test_runtime_boot

The log dumping to console is on purpose actually since we might want to assert a schema from those msgs eventually using pytest's streams capture.

I will change the test for sure 👍🏼

goodboy commented 1 year ago

You should add log level to test_runtime_boot as it's instantiation is logging at info by default. Also there is a bunch of market data being dumped in the console:

As per chat discussion, the issue isn't this test func since the fixture takes care of binding in the log level. So it's got to be an issue elsewhere (probably hardcoded info level?).

I'll check.

goodboy commented 1 year ago

Yup, had to patch the clearing._client.open_ems() to passthrough a loglevel: str and then adjust the service tests to passthrough the fixture value.

All there now please review!

jaredgoldman commented 1 year ago

Looking good now @goodboy