René's URL Explorer Experiment


Title: test: strict positional parameter enforcement is ignored under pytest · Issue #2755 · googleapis/google-api-python-client · GitHub

Open Graph Title: test: strict positional parameter enforcement is ignored under pytest · Issue #2755 · googleapis/google-api-python-client

X Title: test: strict positional parameter enforcement is ignored under pytest · Issue #2755 · googleapis/google-api-python-client

Description: Environment details OS type and version: Linux (gLinux / Debian based) Python version: 3.13.12 (also affects all supported Python versions 3.10+) pip version: 26.0.1 google-api-python-client version: 2.197.0 (at commit 6e471c075039dfef24...

Open Graph Description: Environment details OS type and version: Linux (gLinux / Debian based) Python version: 3.13.12 (also affects all supported Python versions 3.10+) pip version: 26.0.1 google-api-python-client versio...

X Description: Environment details OS type and version: Linux (gLinux / Debian based) Python version: 3.13.12 (also affects all supported Python versions 3.10+) pip version: 26.0.1 google-api-python-client versio...

Opengraph URL: https://github.com/googleapis/google-api-python-client/issues/2755

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test: strict positional parameter enforcement is ignored under pytest","articleBody":"#### Environment details\n\n  - OS type and version: Linux (gLinux / Debian based)\n  - Python version: `3.13.12` (also affects all supported Python versions `3.10+`)\n  - pip version: `26.0.1`\n  - `google-api-python-client` version: `2.197.0` (at commit `6e471c075039dfef24e28d11658e03d5c949c7c3`)\n\n#### Steps to reproduce\n\n  1. Check out the `main` branch of `google-api-python-client`.\n  2. Set up a clean virtual environment and install test dependencies (`pytest`, `mock`, `parameterized`).\n  3. Run the strict positional parameters enforcement test directly using `pytest`:\n     ```bash\n     pytest tests/test_discovery.py -k test_tests_should_be_run_with_strict_positional_enforcement\n     ```\n\n#### Code example\n\nThe bug lies in how strict argument enforcement is configured for the test suite in `tests/__init__.py`. \n\nHistorically, the enforcement was configured inside the nose-legacy `setup_package()` hook:\n```python\n# tests/__init__.py\nfrom googleapiclient import _helpers as util\n\ndef setup_package():\n    \"\"\"Run on testing package.\"\"\"\n    util.positional_parameters_enforcement = \"EXCEPTION\"\n```\n\nBecause modern test runs in this repository (including via `nox` sessions) run under **`pytest`**, the `setup_package()` package-level hook is ignored. As a result, the tests run in warning-only mode, causing strict parameter assertion tests to be bypassed and fail with an `AssertionError` instead of raising `TypeError`.\n\nSince the repository has migrated to `pytest`, this legacy hook is dead code. We should configure the variable directly at the package module level and completely remove the unused `setup_package` hook:\n\n```diff\n# tests/__init__.py\nfrom googleapiclient import _helpers as util\n\n+util.positional_parameters_enforcement = \"EXCEPTION\"\n-\n-def setup_package():\n-    \"\"\"Run on testing package.\"\"\"\n-    util.positional_parameters_enforcement = \"EXCEPTION\"\n```\n\n#### Stack trace\n\nWhen running the tests using `pytest`, the test fails with the following output:\n\n```\n=================================== FAILURES ===================================\n_ DiscoveryErrors.test_tests_should_be_run_with_strict_positional_enforcement __\n\nself = \u003ctests.test_discovery.DiscoveryErrors testMethod=test_tests_should_be_run_with_strict_positional_enforcement>\n\n    def test_tests_should_be_run_with_strict_positional_enforcement(self):\n        try:\n            plus = build(\"plus\", \"v1\", None, static_discovery=False)\n>           self.fail(\"should have raised a TypeError exception over missing http=.\")\nE           AssertionError: should have raised a TypeError exception over missing http=.\n\ntests/test_discovery.py:509: AssertionError\n------------------------------ Captured log call -------------------------------\nWARNING  googleapiclient._helpers:_helpers.py:129 build() takes at most 2 positional arguments (3 given)\n=========================== short test summary info ============================\nFAILED tests/test_discovery.py::DiscoveryErrors::test_tests_should_be_run_with_strict_positional_enforcement\n====================== 1 failed, 332 deselected in 1.65s =======================\n```\n","author":{"url":"https://github.com/Capstan","@type":"Person","name":"Capstan"},"datePublished":"2026-05-31T01:20:42Z","url":"https://github.com/googleapis/google-api-python-client/issues/2755"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:252bfc7f-1e92-98ca-f752-c1a903f18422
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE652:882E2:440F6F:5C1D51:6B00C8FE
html-safe-nonce48491437e5edef25512ebf8a6f7745de83038fca6c50ca774e7a2ab2d19d97c6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjUyOjg4MkUyOjQ0MEY2Rjo1QzFENTE6NkIwMEM4RkUiLCJ2aXNpdG9yX2lkIjoiMTA2OTE1ODA5OTI1Nzk2ODg5NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac1aa35a8cc575a486c3a1706eb62d96584834913bc605132922b8664657fd1cb1
hovercard-subject-tagissue:4556218893
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/google-api-python-client/2755/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b132b2d514530048eb2725fa17ab18ee800cf76d7a00259db782a93ab501ea0e/googleapis/google-api-python-client/issues/2755
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b132b2d514530048eb2725fa17ab18ee800cf76d7a00259db782a93ab501ea0e/googleapis/google-api-python-client/issues/2755
og:image:altEnvironment details OS type and version: Linux (gLinux / Debian based) Python version: 3.13.12 (also affects all supported Python versions 3.10+) pip version: 26.0.1 google-api-python-client versio...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameCapstan
hostnamegithub.com
expected-hostnamegithub.com
None98dc00e171c204462a6f367482a0f8c3c6b5dbca99cd7390e82d2df49ce096e4
turbo-cache-controlno-preview
go-importgithub.com/googleapis/google-api-python-client git https://github.com/googleapis/google-api-python-client.git
octolytics-dimension-user_id16785467
octolytics-dimension-user_logingoogleapis
octolytics-dimension-repository_id15749269
octolytics-dimension-repository_nwogoogleapis/google-api-python-client
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id15749269
octolytics-dimension-repository_network_root_nwogoogleapis/google-api-python-client
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseef013399cf0a3c324bea644a685d7c1e0f06b5b7
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/googleapis/google-api-python-client/issues/2755#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fgoogle-api-python-client%2Fissues%2F2755
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fgoogle-api-python-client%2Fissues%2F2755
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=googleapis%2Fgoogle-api-python-client
Reloadhttps://github.com/googleapis/google-api-python-client/issues/2755
Reloadhttps://github.com/googleapis/google-api-python-client/issues/2755
Reloadhttps://github.com/googleapis/google-api-python-client/issues/2755
googleapishttps://github.com/googleapis
google-api-python-clienthttps://github.com/googleapis/google-api-python-client
Codehttps://github.com/googleapis/google-api-python-client
Issues18 (18)https://github.com/googleapis/google-api-python-client/issues
Pull requests39 (39)https://github.com/googleapis/google-api-python-client/pulls
Discussionshttps://github.com/googleapis/google-api-python-client/discussions
Actionshttps://github.com/googleapis/google-api-python-client/actions
Projectshttps://github.com/googleapis/google-api-python-client/projects
Security and qualityhttps://github.com/googleapis/google-api-python-client/security
Insightshttps://github.com/googleapis/google-api-python-client/insights
https://github.com/googleapis/google-api-python-client
New issuehttps://github.com/login?return_to=https://github.com/googleapis/google-api-python-client/issues/2755
New issuehttps://github.com/login?return_to=https://github.com/googleapis/google-api-python-client/issues/2755
#2802https://github.com/googleapis/google-api-python-client/pull/2802
#2756https://github.com/googleapis/google-api-python-client/pull/2756
test: strict positional parameter enforcement is ignored under pytesthttps://github.com/googleapis/google-api-python-client/issues/2755#top
#2802https://github.com/googleapis/google-api-python-client/pull/2802
#2756https://github.com/googleapis/google-api-python-client/pull/2756
https://github.com/parthea
https://github.com/Capstan
Capstanhttps://github.com/Capstan
on May 31, 2026https://github.com/googleapis/google-api-python-client/issues/2755#issue-4556218893
partheahttps://github.com/parthea
on Nov 16, 2026https://github.com/googleapis/google-api-python-client/issues/2755#event-36306671255
Sign up for freehttps://github.com/signup?return_to=https://github.com/googleapis/google-api-python-client/issues/2755
Sign in to commenthttps://github.com/login?return_to=https://github.com/googleapis/google-api-python-client/issues/2755
partheahttps://github.com/parthea
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.