Title: xUnit test runner fails to find module dictionary · Issue #372 · pythonnet/pythonnet · GitHub
Open Graph Title: xUnit test runner fails to find module dictionary · Issue #372 · pythonnet/pythonnet
X Title: xUnit test runner fails to find module dictionary · Issue #372 · pythonnet/pythonnet
Description: Environment Pythonnet version: v2.2.2 Python version: all Operating System: Windows Details Describe what you were trying to get done. Replace nUnit to xUnit framework. What commands did you run to trigger this issue? If you can provide ...
Open Graph Description: Environment Pythonnet version: v2.2.2 Python version: all Operating System: Windows Details Describe what you were trying to get done. Replace nUnit to xUnit framework. What commands did you run to...
X Description: Environment Pythonnet version: v2.2.2 Python version: all Operating System: Windows Details Describe what you were trying to get done. Replace nUnit to xUnit framework. What commands did you run to...
Opengraph URL: https://github.com/pythonnet/pythonnet/issues/372
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"xUnit test runner fails to find module dictionary","articleBody":"### Environment\r\n\r\n- Pythonnet version: `v2.2.2`\r\n- Python version: `all`\r\n- Operating System: `Windows`\r\n\r\n### Details\r\n\r\n- Describe what you were trying to get done.\r\n\r\nReplace `nUnit` to `xUnit` framework.\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\nBelow is one of the tests rewritten for `xUnit`\r\n\r\n```csharp\r\n\r\nusing System.Collections.Generic;\r\nusing Xunit;\r\nusing Python.Runtime;\r\n\r\nnamespace Python.EmbeddingTest\r\n{\r\n public class PyIterTest\r\n {\r\n [Fact]\r\n public void TestOnPyList()\r\n {\r\n using (Py.GIL())\r\n {\r\n var list = new PyList();\r\n list.Append(new PyString(\"foo\"));\r\n list.Append(new PyString(\"bar\"));\r\n list.Append(new PyString(\"baz\"));\r\n var result = new List\u003cstring\u003e();\r\n foreach (PyObject item in list)\r\n {\r\n result.Add(item.ToString());\r\n }\r\n Assert.Equal(3, result.Count);\r\n Assert.Equal(\"foo\", result[0]);\r\n Assert.Equal(\"bar\", result[1]);\r\n Assert.Equal(\"baz\", result[2]);\r\n }\r\n }\r\n }\r\n}\r\n```\r\n\r\n- If there was a crash, please include the traceback here.\r\n\r\n```\r\nError msg: Fatal Python error: PyImport_GetModuleDict: no module dictionary!\r\n```\r\n","author":{"url":"https://github.com/vmuriart","@type":"Person","name":"vmuriart"},"datePublished":"2017-02-09T21:16:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/372/pythonnet/issues/372"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:dcdae73a-5fdd-b121-4487-c701aa629b0d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CF52:2C38E5:14E093B:1D46616:6970D153 |
| html-safe-nonce | 61cde51beecaea3f59c17ad7da17e2b12a652067d0016377b3b85849be924be6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjUyOjJDMzhFNToxNEUwOTNCOjFENDY2MTY6Njk3MEQxNTMiLCJ2aXNpdG9yX2lkIjoiOTE1ODU1OTYzNzgwMjM3MzQ1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ae0d74e624830fd66f01baaf59900a2291f3dd828f29d0782860f80b8e5ec96b |
| hovercard-subject-tag | issue:206632061 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/pythonnet/pythonnet/372/issue_layout |
| twitter:image | https://opengraph.githubassets.com/87b4e7e9f4206539106afbde3732835e34fb2544911ddafbdfa3269e6eb58db1/pythonnet/pythonnet/issues/372 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/87b4e7e9f4206539106afbde3732835e34fb2544911ddafbdfa3269e6eb58db1/pythonnet/pythonnet/issues/372 |
| og:image:alt | Environment Pythonnet version: v2.2.2 Python version: all Operating System: Windows Details Describe what you were trying to get done. Replace nUnit to xUnit framework. What commands did you run to... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vmuriart |
| hostname | github.com |
| expected-hostname | github.com |
| None | 034aaee9edccd455c18591b13122193c6e12dc773e8a203be73abe934f3e3a72 |
| turbo-cache-control | no-preview |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 52d1d534d0b88c64972e852deb460d09b433b8b2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width