René's URL Explorer Experiment


Title: pytest discovery crashes when calling clr.AddReference · Issue #1011 · pythonnet/pythonnet · GitHub

Open Graph Title: pytest discovery crashes when calling clr.AddReference · Issue #1011 · pythonnet/pythonnet

X Title: pytest discovery crashes when calling clr.AddReference · Issue #1011 · pythonnet/pythonnet

Description: Environment Pythonnet version: 2.4.0 Python version: Python 3.6.0 |Continuum Analytics, Inc.| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32 Operating System: Windows 10 (1803) pytest: 5.3.1 Details Describe what y...

Open Graph Description: Environment Pythonnet version: 2.4.0 Python version: Python 3.6.0 |Continuum Analytics, Inc.| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32 Operating System: Windows 10 (180...

X Description: Environment Pythonnet version: 2.4.0 Python version: Python 3.6.0 |Continuum Analytics, Inc.| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32 Operating System: Windows 10 (180...

Opengraph URL: https://github.com/pythonnet/pythonnet/issues/1011

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"pytest discovery crashes when calling clr.AddReference","articleBody":"### Environment\r\n\r\n-   Pythonnet version: 2.4.0\r\n-   Python version: Python 3.6.0 |Continuum Analytics, Inc.| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32\r\n-   Operating System: Windows 10 (1803)\r\n- pytest: 5.3.1\r\n\r\n### Details\r\n\r\n-   Describe what you were trying to get done.\r\n\r\nI'm trying to discover and run tests that include calls to `clr.AddReference` in their module level imports.\r\n\r\n-   What commands did you run to trigger this issue? If you can provide a\r\n    [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve)\r\n    this will help us understand the issue.\r\n\r\n1. Create a pytest test file that looks like this:\r\n\r\n```python\r\nimport clr\r\n\r\nclr.AddReference(r\"c:\\some_net_dll.dll\")\r\n\r\ndef test_just_a_dummy():\r\n    assert 1 == 1\r\n```\r\n2. Replace the reference to a DLL above to a real .net DLL that loads fine when the above file is just run using regular python.exe.\r\n3. Use VS Code test discovery, or just call `pytest --collect-only`\r\n\r\n-   If there was a crash, please include the traceback here.\r\n\r\n```\r\n============================================================= test session starts =============================================================\r\nplatform win32 -- Python 3.6.0, pytest-5.3.1, py-1.8.0, pluggy-0.13.1\r\nrootdir: C:\\Users\\me\\source\\repos\\utils-tester\r\ncollecting ... Windows fatal exception: code 1073807366\r\n\r\nCurrent thread 0x0000468c (most recent call first):\r\n  File \"c:\\Users\\me\\source\\repos\\utils-tester\\tests\\plypost_test.py\", line 3 in \u003cmodule\u003e\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\_pytest\\assertion\\rewrite.py\", line 143 in exec_module\r\n  File \"\u003cfrozen importlib._bootstrap\u003e\", line 655 in _load_unlocked\r\n  File \"\u003cfrozen importlib._bootstrap\u003e\", line 950 in _find_and_load_unlocked\r\n  File \"\u003cfrozen importlib._bootstrap\u003e\", line 961 in _find_and_load\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\py\\_path\\local.py\", line 701 in pyimport\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\_pytest\\python.py\", line 492 in _importtestmodule\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\_pytest\\python.py\", line 424 in _getobj\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\_pytest\\python.py\", line 248 in obj\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\_pytest\\python.py\", line 440 in _inject_setup_module_fixture\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\_pytest\\python.py\", line 427 in collect\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\_pytest\\runner.py\", line 254 in \u003clambda\u003e\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\_pytest\\runner.py\", line 234 in from_call\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\_pytest\\runner.py\", line 254 in pytest_make_collect_report\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\pluggy\\callers.py\", line 187 in _multicall\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\pluggy\\manager.py\", line 87 in \u003clambda\u003e\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\pluggy\\manager.py\", line 93 in _hookexec\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\pluggy\\hooks.py\", line 286 in __call__\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\_pytest\\runner.py\", line 373 in collect_one_node\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\_pytest\\main.py\", line 717 in genitems\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\_pytest\\main.py\", line 720 in genitems\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\_pytest\\main.py\", line 492 in _perform_collect\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\_pytest\\main.py\", line 454 in perform_collect\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\_pytest\\main.py\", line 255 in pytest_collection\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\pluggy\\callers.py\", line 187 in _multicall\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\pluggy\\manager.py\", line 87 in \u003clambda\u003e\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\pluggy\\manager.py\", line 93 in _hookexec\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\pluggy\\hooks.py\", line 286 in __call__\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\_pytest\\main.py\", line 245 in _main\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\_pytest\\main.py\", line 196 in wrap_session\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\_pytest\\main.py\", line 239 in pytest_cmdline_main\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\pluggy\\callers.py\", line 187 in _multicall\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\pluggy\\manager.py\", line 87 in \u003clambda\u003e\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\pluggy\\manager.py\", line 93 in _hookexec\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\pluggy\\hooks.py\", line 286 in __call__\r\n  File \"c:\\users\\me\\source\\repos\\utils-tester\\.venv\\lib\\site-packages\\_pytest\\config\\__init__.py\", line 92 in main\r\n  File \"C:\\Users\\me\\source\\repos\\utils-tester\\.venv\\Scripts\\pytest.exe\\__main__.py\", line 9 in \u003cmodule\u003e\r\n  File \"C:\\ProgramData\\Anaconda3\\Lib\\runpy.py\", line 85 in _run_code\r\n  File \"C:\\ProgramData\\Anaconda3\\Lib\\runpy.py\", line 193 in _run_module_as_main\r\nWindows fatal exception: code 1073807366\r\n```\r\n","author":{"url":"https://github.com/mungojam","@type":"Person","name":"mungojam"},"datePublished":"2019-12-11T22:22:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/1011/pythonnet/issues/1011"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7e54f39b-9fb8-6423-0315-953a960b3a83
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE3D0:AF14D:12D1C12:1A59233:6970CCC0
html-safe-nonce9531461697ea90f521ef0b7455edd4948a970b1410e14742f8ec9aaa96dd4dc7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFM0QwOkFGMTREOjEyRDFDMTI6MUE1OTIzMzo2OTcwQ0NDMCIsInZpc2l0b3JfaWQiOiIzNzcyMjI4MTAzNzc4MTI3MDQwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmaca694027f575ebf5139c5e72d29f05c410931c6f66d2fbabac30c532112f9b657
hovercard-subject-tagissue:536647099
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/pythonnet/pythonnet/1011/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5c52e224f0ab71a0c81605ced535ed7fc58b57af13095483017a74ad3c317a40/pythonnet/pythonnet/issues/1011
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5c52e224f0ab71a0c81605ced535ed7fc58b57af13095483017a74ad3c317a40/pythonnet/pythonnet/issues/1011
og:image:altEnvironment Pythonnet version: 2.4.0 Python version: Python 3.6.0 |Continuum Analytics, Inc.| (default, Dec 23 2016, 11:57:41) [MSC v.1900 64 bit (AMD64)] on win32 Operating System: Windows 10 (180...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemungojam
hostnamegithub.com
expected-hostnamegithub.com
None721764876e433c894814212f8100f6610f1dde78a987acc2e385d8be8e170e9c
turbo-cache-controlno-preview
go-importgithub.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git
octolytics-dimension-user_id6050430
octolytics-dimension-user_loginpythonnet
octolytics-dimension-repository_id14748123
octolytics-dimension-repository_nwopythonnet/pythonnet
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id14748123
octolytics-dimension-repository_network_root_nwopythonnet/pythonnet
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
release6ff3d08f4ee1c3f89ebedf4df8fc8fe851190294
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/pythonnet/pythonnet/issues/1011#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpythonnet%2Fpythonnet%2Fissues%2F1011
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%2Fpythonnet%2Fpythonnet%2Fissues%2F1011
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=pythonnet%2Fpythonnet
Reloadhttps://github.com/pythonnet/pythonnet/issues/1011
Reloadhttps://github.com/pythonnet/pythonnet/issues/1011
Reloadhttps://github.com/pythonnet/pythonnet/issues/1011
pythonnet https://github.com/pythonnet
pythonnethttps://github.com/pythonnet/pythonnet
Notifications https://github.com/login?return_to=%2Fpythonnet%2Fpythonnet
Fork 770 https://github.com/login?return_to=%2Fpythonnet%2Fpythonnet
Star 5.4k https://github.com/login?return_to=%2Fpythonnet%2Fpythonnet
Code https://github.com/pythonnet/pythonnet
Issues 155 https://github.com/pythonnet/pythonnet/issues
Pull requests 18 https://github.com/pythonnet/pythonnet/pulls
Discussions https://github.com/pythonnet/pythonnet/discussions
Actions https://github.com/pythonnet/pythonnet/actions
Projects 0 https://github.com/pythonnet/pythonnet/projects
Wiki https://github.com/pythonnet/pythonnet/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/pythonnet/pythonnet/security
Please reload this pagehttps://github.com/pythonnet/pythonnet/issues/1011
Insights https://github.com/pythonnet/pythonnet/pulse
Code https://github.com/pythonnet/pythonnet
Issues https://github.com/pythonnet/pythonnet/issues
Pull requests https://github.com/pythonnet/pythonnet/pulls
Discussions https://github.com/pythonnet/pythonnet/discussions
Actions https://github.com/pythonnet/pythonnet/actions
Projects https://github.com/pythonnet/pythonnet/projects
Wiki https://github.com/pythonnet/pythonnet/wiki
Security https://github.com/pythonnet/pythonnet/security
Insights https://github.com/pythonnet/pythonnet/pulse
New issuehttps://github.com/login?return_to=https://github.com/pythonnet/pythonnet/issues/1011
New issuehttps://github.com/login?return_to=https://github.com/pythonnet/pythonnet/issues/1011
pytest discovery crashes when calling clr.AddReferencehttps://github.com/pythonnet/pythonnet/issues/1011#top
https://github.com/mungojam
https://github.com/mungojam
mungojamhttps://github.com/mungojam
on Dec 11, 2019https://github.com/pythonnet/pythonnet/issues/1011#issue-536647099
Minimal, Complete, and Verifiable examplehttp://stackoverflow.com/help/mcve
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.