René's URL Explorer Experiment


Title: Some xfail markings fail to validate their exception types · Issue #1893 · gitpython-developers/GitPython · GitHub

Open Graph Title: Some xfail markings fail to validate their exception types · Issue #1893 · gitpython-developers/GitPython

X Title: Some xfail markings fail to validate their exception types · Issue #1893 · gitpython-developers/GitPython

Description: This bug was discovered by @Borda in #1888. Because that PR's central focus is tooling to catch typos, I'm creating this issue so that this bug in the test suite is clear, and so it will not be forgotten regardless of how development pro...

Open Graph Description: This bug was discovered by @Borda in #1888. Because that PR's central focus is tooling to catch typos, I'm creating this issue so that this bug in the test suite is clear, and so it will not be for...

X Description: This bug was discovered by @Borda in #1888. Because that PR's central focus is tooling to catch typos, I'm creating this issue so that this bug in the test suite is clear, and so it will no...

Opengraph URL: https://github.com/gitpython-developers/GitPython/issues/1893

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Some xfail markings fail to validate their exception types","articleBody":"This bug was discovered by @Borda in #1888. Because that PR's central focus is tooling to catch typos, I'm creating this issue so that this bug in the test suite is clear, and so it will not be forgotten regardless of how development proceeds there. This affects three test cases in `test_index.py`.\r\n\r\nIn #1777, I introduced `test_run_commit_hook`. This is expected to fail in a couple of situations where it should nonetheless be feasible to run the test suite. One of these is when the tests are run on a (native) Windows system that has no `bash` that can be found in a path search, neither in `System32` or otherwise and neither WSL-related or otherwise. The test included an xfail marking to cover that case:\r\n\r\nhttps://github.com/gitpython-developers/GitPython/blob/53640535cf8314366a01da081947dd8504a299cd/test/test_index.py#L1018-L1022\r\n\r\nIn that PR I also added those xfail markings to other tests to which they applied, and I used copy and paste to reproduce the parts that should be exactly the same across them.\r\n\r\nBut that contains a typo, passing a `rasies` argument when constructing the mark, rather than the correct `raises` argument. The wrong argument is apparently ignored, so the marking is unconstrained, and even if those tests fail with a different exception -- one that is not covered by other xfail markings, and that is not intended to be covered by the ones with the misspelling, including `AssertionError` from an `assert` statement in the test -- the problem would not be caught.\r\n\r\nThis is distinct from the more common problem of misspelling a mark, which is also not an error, but which `pytest` does have the ability to warn about.\r\n\r\n**Fortunately, the way those tests fail is as the xfail markings attempt to describe and will actually describe once fixed.** I have retested the cases not covered on CI, and they work with the changes to `test_index.py` appearing in [a20d5db](https://github.com/gitpython-developers/GitPython/pull/1888/commits/a20d5db6dd2943057e8709769d131db9cf821611) (#1888). I only checked out the changes to `test_index.py` in testing this, not the other files. In a virtual machine running Windows Server 2022 (version 10.0.20348), I have just tested the cases where:\r\n\r\n- `bash.exe` exists, is the WSL-related command in `System32`, but there is no WSL system installed.\r\n- `bash.exe` exists, is not the WSL-related command in `System32` but is instead Git Bash, and is working.\r\n- `bash.exe` does not exist anywhere found in a `Popen` call, not even in `System32`.\r\n\r\nThe latter case I believe still occurs on some Windows systems that nothing unusual has been done to, but is rare because usually a WSL-related `bash.exe` appears in `System32` even if WSL is not installed, and (non-shell) path search on Windows generally includes `System32` automatically, and even places it before `PATH` directories even if it appears late or not at all in `PATH`.\r\n\r\n(I retested it the same way I had done originally: by saving a snapshot to restore, then using [NanaRun MinSudo](https://github.com/M2Team/NanaRun?tab=readme-ov-file#minsudo) to run a shell as the special TrustedInstaller user, which is permitted to delete even specially protected files in `System32`. I suggest against doing such a thing outside a virtual machine; I snapshotted the VM first and restored it after the test.)","author":{"url":"https://github.com/EliahKagan","@type":"Person","name":"EliahKagan"},"datePublished":"2024-04-01T02:15:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1893/GitPython/issues/1893"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:5036b6fd-4aed-8357-2ab4-0abae7a1e5a7
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB982:154341:6373C:8BB86:6968B4EC
html-safe-nonce1f33998b6bf8e1cd672b4654184dbc1162e4b2dc4903fbc111a0b9ceb2f574d1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTgyOjE1NDM0MTo2MzczQzo4QkI4Njo2OTY4QjRFQyIsInZpc2l0b3JfaWQiOiI3OTIxNDM4Mjk3MjQ0MDg3NTMyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacff16eeddc290e1cbe21dd3878e8e7d4ee17d955a7a091cad25bf228f5af1a346
hovercard-subject-tagissue:2217361123
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/gitpython-developers/GitPython/1893/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ae49b54a722edb4f97e07494376356cf3bd41c91e8f07565080bf0dacfc3b75e/gitpython-developers/GitPython/issues/1893
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ae49b54a722edb4f97e07494376356cf3bd41c91e8f07565080bf0dacfc3b75e/gitpython-developers/GitPython/issues/1893
og:image:altThis bug was discovered by @Borda in #1888. Because that PR's central focus is tooling to catch typos, I'm creating this issue so that this bug in the test suite is clear, and so it will not be for...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameEliahKagan
hostnamegithub.com
expected-hostnamegithub.com
Nonefdc7c66bd36a6c12eb8e771e806db863266e573fc299e77f27505a768d4f8a98
turbo-cache-controlno-preview
go-importgithub.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git
octolytics-dimension-user_id503709
octolytics-dimension-user_logingitpython-developers
octolytics-dimension-repository_id1126087
octolytics-dimension-repository_nwogitpython-developers/GitPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1126087
octolytics-dimension-repository_network_root_nwogitpython-developers/GitPython
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
release3223a6503d318917691422cdadfbe16cd8fb21e5
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/gitpython-developers/GitPython/issues/1893#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fissues%2F1893
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fissues%2F1893
Sign up https://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=gitpython-developers%2FGitPython
Reloadhttps://github.com/gitpython-developers/GitPython/issues/1893
Reloadhttps://github.com/gitpython-developers/GitPython/issues/1893
Reloadhttps://github.com/gitpython-developers/GitPython/issues/1893
gitpython-developers https://github.com/gitpython-developers
GitPythonhttps://github.com/gitpython-developers/GitPython
Please reload this pagehttps://github.com/gitpython-developers/GitPython/issues/1893
Notifications https://github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Fork 964 https://github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Star 5k https://github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Code https://github.com/gitpython-developers/GitPython
Issues 169 https://github.com/gitpython-developers/GitPython/issues
Pull requests 8 https://github.com/gitpython-developers/GitPython/pulls
Discussions https://github.com/gitpython-developers/GitPython/discussions
Actions https://github.com/gitpython-developers/GitPython/actions
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/gitpython-developers/GitPython/security
Please reload this pagehttps://github.com/gitpython-developers/GitPython/issues/1893
Insights https://github.com/gitpython-developers/GitPython/pulse
Code https://github.com/gitpython-developers/GitPython
Issues https://github.com/gitpython-developers/GitPython/issues
Pull requests https://github.com/gitpython-developers/GitPython/pulls
Discussions https://github.com/gitpython-developers/GitPython/discussions
Actions https://github.com/gitpython-developers/GitPython/actions
Security https://github.com/gitpython-developers/GitPython/security
Insights https://github.com/gitpython-developers/GitPython/pulse
New issuehttps://github.com/login?return_to=https://github.com/gitpython-developers/GitPython/issues/1893
New issuehttps://github.com/login?return_to=https://github.com/gitpython-developers/GitPython/issues/1893
Some xfail markings fail to validate their exception typeshttps://github.com/gitpython-developers/GitPython/issues/1893#top
acknowledgedhttps://github.com/gitpython-developers/GitPython/issues?q=state%3Aopen%20label%3A%22acknowledged%22
help wantedhttps://github.com/gitpython-developers/GitPython/issues?q=state%3Aopen%20label%3A%22help%20wanted%22
https://github.com/EliahKagan
https://github.com/EliahKagan
EliahKaganhttps://github.com/EliahKagan
on Apr 1, 2024https://github.com/gitpython-developers/GitPython/issues/1893#issue-2217361123
@Bordahttps://github.com/Borda
#1888https://github.com/gitpython-developers/GitPython/pull/1888
#1777https://github.com/gitpython-developers/GitPython/pull/1777
GitPython/test/test_index.pyhttps://github.com/gitpython-developers/GitPython/blob/53640535cf8314366a01da081947dd8504a299cd/test/test_index.py#L1018-L1022
5364053https://github.com/gitpython-developers/GitPython/commit/53640535cf8314366a01da081947dd8504a299cd
a20d5dbhttps://github.com/gitpython-developers/GitPython/pull/1888/commits/a20d5db6dd2943057e8709769d131db9cf821611
#1888https://github.com/gitpython-developers/GitPython/pull/1888
NanaRun MinSudohttps://github.com/M2Team/NanaRun?tab=readme-ov-file#minsudo
acknowledgedhttps://github.com/gitpython-developers/GitPython/issues?q=state%3Aopen%20label%3A%22acknowledged%22
help wantedhttps://github.com/gitpython-developers/GitPython/issues?q=state%3Aopen%20label%3A%22help%20wanted%22
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.