René's URL Explorer Experiment


Title: Static and run-time tests for stubs by vlasovskikh · Pull Request #917 · python/typeshed · GitHub

Open Graph Title: Static and run-time tests for stubs by vlasovskikh · Pull Request #917 · python/typeshed

X Title: Static and run-time tests for stubs by vlasovskikh · Pull Request #917 · python/typeshed

Description: Based on the discussion in #862 I propose a better way of testing stubs. The tests in this PR are a subject to both static checking by a type checker and run-time checking via pytest. The convention for testing your change to stub files: Add pytest-compatible tests that use the API of the stub you're about to change A test should pass the run-time pytest check A test should statically fail with type errors before the change and pass after it A third-party library test should pip install its precise dependencies as the first step

Open Graph Description: Based on the discussion in #862 I propose a better way of testing stubs. The tests in this PR are a subject to both static checking by a type checker and run-time checking via pytest. The conventio...

X Description: Based on the discussion in #862 I propose a better way of testing stubs. The tests in this PR are a subject to both static checking by a type checker and run-time checking via pytest. The conventio...

Opengraph URL: https://github.com/python/typeshed/pull/917

X: @github

direct link

Domain: github.com

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:847fb563-6c60-bd6f-d212-04c596c964c5
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9D54:2D8191:C01CB:FDB5D:6B001C87
html-safe-nonceb1e5ea3280e23332169905fba619269e1a5d4a2759f6495d92305b5d1701e7ed
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDU0OjJEODE5MTpDMDFDQjpGREI1RDo2QjAwMUM4NyIsInZpc2l0b3JfaWQiOiI1NjA3OTc5MTA0MTU1NDc1MDc5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac7a76c724d9d136f8c285031c6dac4cfadc3f917b73181b999a24295a3556e749
hovercard-subject-tagpull_request:104713747
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/typeshed/pull/917/files
twitter:imagehttps://avatars.githubusercontent.com/u/126891?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/126891?s=400&v=4
og:image:altBased on the discussion in #862 I propose a better way of testing stubs. The tests in this PR are a subject to both static checking by a type checker and run-time checking via pytest. The conventio...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/typeshed git https://github.com/python/typeshed.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id31696383
octolytics-dimension-repository_nwopython/typeshed
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31696383
octolytics-dimension-repository_network_root_nwopython/typeshed
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release44c658b24abf00491fb7ae5f56d42c9f38cbeab2
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/typeshed/pull/917/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Ftypeshed%2Fpull%2F917%2Ffiles
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%2Fpython%2Ftypeshed%2Fpull%2F917%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Ftypeshed
Reloadhttps://github.com/python/typeshed/pull/917/files
Reloadhttps://github.com/python/typeshed/pull/917/files
Reloadhttps://github.com/python/typeshed/pull/917/files
pythonhttps://github.com/python
typeshedhttps://github.com/python/typeshed
Codehttps://github.com/python/typeshed
Issues196 (196)https://github.com/python/typeshed/issues
Pull requests251 (251)https://github.com/python/typeshed/pulls
Actionshttps://github.com/python/typeshed/actions
Security and qualityhttps://github.com/python/typeshed/security
Insightshttps://github.com/python/typeshed/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Ftypeshed%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Ftypeshed%2Fissues%2Fnew%2Fchoose
vlasovskikhhttps://github.com/vlasovskikh
python:masterhttps://github.com/python/typeshed/tree/master
JetBrains:static-and-runtime-testshttps://github.com/JetBrains/typeshed/tree/static-and-runtime-tests
Conversation 43 https://github.com/python/typeshed/pull/917
Commits 10 https://github.com/python/typeshed/pull/917/commits
Checks 0 https://github.com/python/typeshed/pull/917/checks
Files changed https://github.com/python/typeshed/pull/917/files
Please reload this pagehttps://github.com/python/typeshed/pull/917/files
Static and run-time tests for stubs https://github.com/python/typeshed/pull/917/files#top
Show all changes 10 commits https://github.com/python/typeshed/pull/917/files
4e8d414 Convention for test data which uses APIs defined by Python stubs vlasovskikh Jan 26, 2017 https://github.com/python/typeshed/pull/917/commits/4e8d414dd14f7282ddbc85a9207dae06f68160d3
4066d7f Run-time + static tests for stubs vlasovskikh Feb 5, 2017 https://github.com/python/typeshed/pull/917/commits/4066d7ff0672a3f350341019708bb280c05c5ff8
4f2e158 Mentioned both static and run-time checking in CONTRIBUTING vlasovskikh Feb 5, 2017 https://github.com/python/typeshed/pull/917/commits/4f2e158dedf1aa4ea029fa32283beefa1b2d4ce6
992df42 Made runtime_test.py executable vlasovskikh Feb 5, 2017 https://github.com/python/typeshed/pull/917/commits/992df42a5dfb96697c647506b5088eabcd69f50b
774d5ff Ignore flake8 warnings about imports not at the top of the file for a… vlasovskikh Feb 5, 2017 https://github.com/python/typeshed/pull/917/commits/774d5ffc0aadc25ad3eeb6bd70c9c22abe1c734a
ba61c11 Removed debug output for checking Python version at Travis vlasovskikh Feb 5, 2017 https://github.com/python/typeshed/pull/917/commits/ba61c115b7e7518c59c6e13287d2a4201d0f937b
41d5b7c Install *_requirements.txt for *_test.py automatically during test run vlasovskikh Feb 7, 2017 https://github.com/python/typeshed/pull/917/commits/41d5b7c3b56934c8f85fdcf3313a57ce2f5f04a9
aa4ace1 Added a section about testing stubs with an example vlasovskikh Feb 7, 2017 https://github.com/python/typeshed/pull/917/commits/aa4ace141ce57ffe6072157af89af73285f4b493
dfca122 Temporarily turned off running pytype for test_data vlasovskikh Feb 10, 2017 https://github.com/python/typeshed/pull/917/commits/dfca122cf5780148cb0eda5c58d7a6e45e165fb7
3a3c6ad Reverted running pytype_test (pytd, as it turned out) for *.py files vlasovskikh Feb 10, 2017 https://github.com/python/typeshed/pull/917/commits/3a3c6ad11f3f13ff33da8f12ad260c25b42184fd
Clear filters https://github.com/python/typeshed/pull/917/files
Please reload this pagehttps://github.com/python/typeshed/pull/917/files
Please reload this pagehttps://github.com/python/typeshed/pull/917/files
.travis.yml https://github.com/python/typeshed/pull/917/files#diff-6ac3f79fc25d95cd1e3d51da53a4b21b939437392578a35ae8cd6d5366ca5485
CONTRIBUTING.md https://github.com/python/typeshed/pull/917/files#diff-eca12c0a30e25b4b46522ebf89465a03ba72a03f540796c979137931d8f92055
conftest.py https://github.com/python/typeshed/pull/917/files#diff-7fdc5d757c24bd5a0090cd26a98c9e3751422557c05130517957c72bd1fe7c4c
pytest.ini https://github.com/python/typeshed/pull/917/files#diff-f655b9d927b31f17a3d2ff84268a7b3e7921e77bf91e2ca1b5eec9dff58108b3
collections_test.py https://github.com/python/typeshed/pull/917/files#diff-25859d9e409c9fe0f5d41190c961615219b9b935ffb51de83076bbc74a1847be
six_requirements.txt https://github.com/python/typeshed/pull/917/files#diff-3490978007ad2c64896332308f44ae1c2933e1e2d5c56634073a64d3deaf8b98
six_test.py https://github.com/python/typeshed/pull/917/files#diff-6b8f8dfc1a7542fc48c5c5ecec13a5ee331773ef1bd4ab2619b9a3512ec51c47
mypy_test.py https://github.com/python/typeshed/pull/917/files#diff-b42eb36bcaa2d1a163ed1c202e81cffd058915ca695b660d49c636b3a5b56857
runtime_test.py https://github.com/python/typeshed/pull/917/files#diff-313552bbda2f7b7a1f84d4ff9c946f81c3d99db4081bcc11c3d97d4252828d72
.travis.ymlhttps://github.com/python/typeshed/pull/917/files#diff-6ac3f79fc25d95cd1e3d51da53a4b21b939437392578a35ae8cd6d5366ca5485
View file https://github.com/JetBrains/typeshed/blob/3a3c6ad11f3f13ff33da8f12ad260c25b42184fd/.travis.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/917/{{ revealButtonHref }}
https://github.com/python/typeshed/pull/917/files#diff-6ac3f79fc25d95cd1e3d51da53a4b21b939437392578a35ae8cd6d5366ca5485
CONTRIBUTING.mdhttps://github.com/python/typeshed/pull/917/files#diff-eca12c0a30e25b4b46522ebf89465a03ba72a03f540796c979137931d8f92055
View file https://github.com/JetBrains/typeshed/blob/3a3c6ad11f3f13ff33da8f12ad260c25b42184fd/CONTRIBUTING.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/917/{{ revealButtonHref }}
https://github.com/python/typeshed/pull/917/files#diff-eca12c0a30e25b4b46522ebf89465a03ba72a03f540796c979137931d8f92055
https://github.com/python/typeshed/pull/917/files#diff-eca12c0a30e25b4b46522ebf89465a03ba72a03f540796c979137931d8f92055
https://github.com/python/typeshed/pull/917/files#diff-eca12c0a30e25b4b46522ebf89465a03ba72a03f540796c979137931d8f92055
https://github.com/python/typeshed/pull/917/files#diff-eca12c0a30e25b4b46522ebf89465a03ba72a03f540796c979137931d8f92055
test_data/conftest.pyhttps://github.com/python/typeshed/pull/917/files#diff-7fdc5d757c24bd5a0090cd26a98c9e3751422557c05130517957c72bd1fe7c4c
View file https://github.com/JetBrains/typeshed/blob/3a3c6ad11f3f13ff33da8f12ad260c25b42184fd/test_data/conftest.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/917/{{ revealButtonHref }}
test_data/pytest.inihttps://github.com/python/typeshed/pull/917/files#diff-f655b9d927b31f17a3d2ff84268a7b3e7921e77bf91e2ca1b5eec9dff58108b3
View file https://github.com/JetBrains/typeshed/blob/3a3c6ad11f3f13ff33da8f12ad260c25b42184fd/test_data/pytest.ini
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/917/{{ revealButtonHref }}
test_data/stdlib/2and3/collections_test.pyhttps://github.com/python/typeshed/pull/917/files#diff-25859d9e409c9fe0f5d41190c961615219b9b935ffb51de83076bbc74a1847be
View file https://github.com/JetBrains/typeshed/blob/3a3c6ad11f3f13ff33da8f12ad260c25b42184fd/test_data/stdlib/2and3/collections_test.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/917/{{ revealButtonHref }}
test_data/third_party/2and3/six_requirements.txthttps://github.com/python/typeshed/pull/917/files#diff-3490978007ad2c64896332308f44ae1c2933e1e2d5c56634073a64d3deaf8b98
View file https://github.com/JetBrains/typeshed/blob/3a3c6ad11f3f13ff33da8f12ad260c25b42184fd/test_data/third_party/2and3/six_requirements.txt
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/917/{{ revealButtonHref }}
test_data/third_party/2and3/six_test.pyhttps://github.com/python/typeshed/pull/917/files#diff-6b8f8dfc1a7542fc48c5c5ecec13a5ee331773ef1bd4ab2619b9a3512ec51c47
View file https://github.com/JetBrains/typeshed/blob/3a3c6ad11f3f13ff33da8f12ad260c25b42184fd/test_data/third_party/2and3/six_test.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/917/{{ revealButtonHref }}
tests/mypy_test.pyhttps://github.com/python/typeshed/pull/917/files#diff-b42eb36bcaa2d1a163ed1c202e81cffd058915ca695b660d49c636b3a5b56857
View file https://github.com/JetBrains/typeshed/blob/3a3c6ad11f3f13ff33da8f12ad260c25b42184fd/tests/mypy_test.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/917/{{ revealButtonHref }}
https://github.com/python/typeshed/pull/917/files#diff-b42eb36bcaa2d1a163ed1c202e81cffd058915ca695b660d49c636b3a5b56857
https://github.com/python/typeshed/pull/917/files#diff-b42eb36bcaa2d1a163ed1c202e81cffd058915ca695b660d49c636b3a5b56857
https://github.com/python/typeshed/pull/917/files#diff-b42eb36bcaa2d1a163ed1c202e81cffd058915ca695b660d49c636b3a5b56857
https://github.com/python/typeshed/pull/917/files#diff-b42eb36bcaa2d1a163ed1c202e81cffd058915ca695b660d49c636b3a5b56857
tests/runtime_test.pyhttps://github.com/python/typeshed/pull/917/files#diff-313552bbda2f7b7a1f84d4ff9c946f81c3d99db4081bcc11c3d97d4252828d72
View file https://github.com/JetBrains/typeshed/blob/3a3c6ad11f3f13ff33da8f12ad260c25b42184fd/tests/runtime_test.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/typeshed/pull/917/{{ revealButtonHref }}
JelleZijlstrahttps://github.com/JelleZijlstra
Feb 6, 2017https://github.com/python/typeshed/pull/917/files#r99509824
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/typeshed/pull/917/files
vlasovskikhhttps://github.com/vlasovskikh
Feb 7, 2017https://github.com/python/typeshed/pull/917/files#r99727658
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
@JelleZijlstrahttps://github.com/JelleZijlstra
Please reload this pagehttps://github.com/python/typeshed/pull/917/files
JelleZijlstrahttps://github.com/JelleZijlstra
Feb 7, 2017https://github.com/python/typeshed/pull/917/files#r99728233
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/typeshed/pull/917/files
vlasovskikhhttps://github.com/vlasovskikh
Feb 7, 2017https://github.com/python/typeshed/pull/917/files#r99728798
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/typeshed/pull/917/files
gvanrossumhttps://github.com/gvanrossum
Feb 10, 2017https://github.com/python/typeshed/pull/917/files#r100582567
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/typeshed/pull/917/files
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.