Commit 6951a8d
Gate live-wire tests behind
``tests/test_requests.py`` connects to a real TWS / IB Gateway on
``127.0.0.1:7497`` to exercise the request error path and the
account-summary flow. Running it by default in ``make test`` is both
dangerous (real ``whatIfOrder`` against whatever account the local
gateway is logged into) and useless (every CI runner and any dev
without TWS hits ``ConnectionRefusedError``).
Add the standard pytest opt-in pattern:
* ``[tool.pytest.ini_options]`` registers the ``live`` marker and
sets ``addopts = "-m 'not live'"`` so the default ``pytest``
invocation deselects the live tests.
* ``tests/test_requests.py`` carries ``pytest.mark.live`` (alongside
the existing ``pytest.mark.asyncio``).
* To run the live tests against a connected TWS / Gateway:
``pytest -m live`` (or ``pytest -m 'live or not live'`` for both).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>live marker, skip by default1 parent 9d29734 commit 6951a8d
2 files changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
114 | 123 | | |
115 | 124 | | |
116 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
0 commit comments