From 8424c368f62fe133a8803a257551c75b0bf06651 Mon Sep 17 00:00:00 2001 From: goodboy Date: Mon, 23 Mar 2026 19:51:53 -0400 Subject: [PATCH] Update feed test fqmes to use `.` format Switch all `test_feeds.py` parametrized fqmes from legacy `.` to the current `..` schema (e.g. `btcusdt.spot.binance`). Deats, - update binance fqmes: `btcusdt.binance` -> `btcusdt.spot.binance`, same for `ethusdt`. - update kraken fqmes: `ethusdt.kraken` -> `ethusdt.spot.kraken`, `xbtusd.kraken` -> `xbtusd.spot.kraken`. - update cross-broker set similarly. - comment out old fqmes with `!TODO` to later validate raising on bad/legacy formats. Also, - reformat `if ci_env and not run_in_ci` to multiline style. - reformat `pytest.skip()` msg to multiline. - add `?TODO` for symbology helper fn. - drop stray `await tractor.pause()` in `conftest.py`. (this commit msg was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code --- tests/conftest.py | 1 - tests/test_feeds.py | 37 ++++++++++++++++++++++++++++++++----- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 2ffc3d0f..599cf568 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -137,7 +137,6 @@ async def _open_test_pikerd( raddr = portal.chan.raddr uw_raddr: tuple = raddr.unwrap() assert uw_raddr == reg_addr - await tractor.pause() yield ( raddr._host, raddr._port, diff --git a/tests/test_feeds.py b/tests/test_feeds.py index 07d368fa..51dd7574 100644 --- a/tests/test_feeds.py +++ b/tests/test_feeds.py @@ -23,13 +23,35 @@ from piker.accounting import ( 'fqmes', [ # binance - (100, {'btcusdt.binance', 'ethusdt.binance'}, False), + (100, { + # !TODO, write a suite which validates raising against + # bad/legacy fqmes such as this! + # 'btcusdt.binance', + 'btcusdt.spot.binance', + 'ethusdt.spot.binance', + }, False), # kraken - (20, {'ethusdt.kraken', 'xbtusd.kraken'}, True), + (20, { + # !TODO, write a suite which validates raising against + # bad/legacy fqmes such as this! + # 'ethusdt.kraken', + # 'xbtusd.kraken', + + 'ethusdt.spot.kraken', + 'xbtusd.spot.kraken', + }, True), # binance + kraken - (100, {'btcusdt.binance', 'xbtusd.kraken'}, False), + (100, { + # !TODO, write a suite which validates raising against + # bad/legacy fqmes such as this! + # 'btcusdt.binance', + # 'xbtusd.kraken', + + 'btcusdt.spot.binance', + 'xbtusd.spot.kraken', + }, False), ], ids=lambda param: f'quotes={param[0]}@fqmes={param[1]}', ) @@ -48,12 +70,17 @@ def test_multi_fqsn_feed( if ( ci_env - and not run_in_ci + and + not run_in_ci ): - pytest.skip('Skipping CI disabled test due to feed restrictions') + pytest.skip( + 'CI-disabled-test due to live-feed restrictions' + ) brokers = set() for fqme in fqmes: + # ?TODO, add this unpack + normalize check to a symbology + # helper fn? brokername, *_ = unpack_fqme(fqme) brokers.add(brokername)