Test coverage gap: run_command logic in the recent parity sweep is untested
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 58/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 52
- Forks
- 17
- Merge medio
- 5 d 20 h
- PR fusionados (30 d)
- 2
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de tableau/tabcmd
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
feat: publish missing --description flag from tabcmd ClassicPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
feat: creategroup missing --role flag from tabcmd ClassicPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Todos los issues de tableau/tabcmd
Issues similares
-
bug difficulty:2 good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
MakazhanAlpamys/Soup#1865 ·
Los mantenedores suelen responder en 1 día
-
area: agents area: docs good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
openapi/gknowledge#23 ·
-
useless-suppression reported for deprecated-* messages that should be exemptPosiblemente ocupada @adityasinha-ghub la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
pylint-dev/pylint#11656 ·
Los mantenedores suelen responder en 1 día
-
area:provisioning effort:S priority:P2 provider:local-libvirt risk:daytime-only status:in-progress type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
randomparity/kdive#3203 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
get() for StrEnumPosiblemente ocupada @FeJo5952 la tomó hoy. Abiertogood first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
collective/icalendar#1921 · 1 comentario ·
Los mantenedores suelen responder en 1 día