Test coverage gap: run_command logic in the recent parity sweep is untested
メンテナーはふだん 11 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 58/100
調査の方向性
Start with the run_command paths described for #451, #452, #447, #448, and #444, using tests/commands/test_create_site_users.py as the testing pattern. Mock the relevant server endpoint methods, invoke Command.run_command(args), and assert that the items passed to them contain the expected normalized or assigned attributes across the covered happy paths.
索引モデルが issue の本文から書いたものです。
説明
Several PRs in the current Classic-parity sweep add argparse-layer tests
but no coverage of the load-bearing logic in run_command where the
parsed args actually get applied to TSC items or normalized. This is a
common pattern across the sweep, not a single-PR issue, so recording
here as a follow-up rather than blocking those PRs.
Concrete gaps
#451 delete syntax normalization. run_command transforms
isinstance(args.workbook, str) -> args.name = args.workbook; args.workbook = True (and same for datasource). This is what makes both
delete Name --workbook and Classic delete --workbook Name produce
equivalent behavior. No test covers the transform; both syntaxes are
verified at the parser layer only. If someone refactors run_command
and drops the normalization, every parser test still passes but Classic
scripts break silently.
#452 editsite attribute application. run_command reads ten new
argparse fields onto SiteItem attributes with three separate patterns:
_str_to_bool coercion for the string-value flags, direct assignment
for the paired boolean flags, and inversion for disable_subscriptions
(from allow_subscriptions). The paired custom_subscription_email +
custom_subscription_email_enabled writes on --subscription-email
(where empty string flips _enabled off) also live in run_command.
None of this is exercised by a mocked server.sites.update call. A
future refactor could drop any of these assignments and no test would
catch it.
#447 creategroup --role. run_command sets
GroupItem.minimum_site_role = args.role before
server.groups.create. Not tested; someone could delete the assignment
and every parser test still passes.
#448 publish --description. run_command sets
new_item.description = args.description on the WorkbookItem or
DatasourceItem before publish. Not tested; same failure mode.
#444 --idp-configuration-id. run_command sets
user_obj.idp_configuration_id = args.idp_configuration_id on every
UserItem in the batch, and apply_cli_overrides clears any pre-existing
auth_setting when the IDP flag is passed. Only the
apply_cli_overrides helper is tested; nothing verifies the attribute
actually reaches the wire.
Suggested shape
Adopt a pattern like tests/commands/test_create_site_users.py uses:
mock the Session/server, mock server.<endpoint>.<method>, invoke
Command.run_command(args), assert the item passed to
server.<endpoint>.<method> has the expected attributes set. Not
required per-flag -- one test per PR covering the main happy path is
enough to lock in the wire-level behavior.
Not tracking here
- #451 bare
--workbookwith no value: parser accepts, run_command
errors out. Already covered at the parser layer; run_command's error
message is standard. - Command-level auth and session setup: shared across all commands and
tested elsewhere. - #455 createsiteusers: already has run_command coverage
(test_create_site_users.py); the gap is elsewhere.
- 主要言語
- Python
- スター
- 52
- フォーク
- 17
- 平均マージ
- 11日 11時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
tableau/tabcmd のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 11 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 11 日以内に返信
-
feat: publish missing --description flag from tabcmd Classic対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 11 日以内に返信
-
feat: creategroup missing --role flag from tabcmd Classic対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 11 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 11 日以内に返信
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ansys/pyansys-common-mcp#213 ·
メンテナーはふだん 3 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
freedomofpress/dangerzone#1594 ·
メンテナーはふだん 3 日以内に返信
-
priority:P1 status:in-review type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
randomparity/kdive#3317 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:ci
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
mesonbuild/meson#16281 ·
メンテナーはふだん 1 日以内に返信