| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -53,9 +53,9 @@ jobs: | |||
| 53 | 53 | run: dotnet test --runtime any-${{ matrix.platform }} src/embed_tests/ | |
| 54 | 54 | if: ${{ matrix.os != 'macos' }} # Not working right now, doesn't find libpython | |
| 55 | 55 | ||
| 56 | - - name: Python tests runner | ||
| 56 | + - name: Python tests run from .NET | ||
| 57 | 57 | run: dotnet test --runtime any-${{ matrix.platform }} src/python_tests_runner/ | |
| 58 | - if: ${{ matrix.os != 'macos' }} # Not working right now, doesn't find libpython | ||
| 58 | + if: ${{ matrix.os == 'windows' }} # Not working for others right now | ||
| 59 | 59 | ||
| 60 | 60 | # TODO: Run perf tests | |
| 61 | 61 | # TODO: Run mono tests on Windows? | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -291,6 +291,9 @@ public static IntPtr __import__(IntPtr self, IntPtr args, IntPtr kw) | |||
| 291 | 291 | // We don't support them anyway | |
| 292 | 292 | return IntPtr.Zero; | |
| 293 | 293 | } | |
| 294 | + // Save the exception | ||
| 295 | + var originalException = new PythonException(); | ||
| 296 | + var originalExceptionMessage = originalException.ToString(); | ||
| 294 | 297 | // Otherwise, just clear the it. | |
| 295 | 298 | Exceptions.Clear(); | |
| 296 | 299 | ||
@@ -342,7 +345,7 @@ public static IntPtr __import__(IntPtr self, IntPtr args, IntPtr kw) | |||
| 342 | 345 | ManagedType mt = tail.GetAttribute(name, true); | |
| 343 | 346 | if (!(mt is ModuleObject)) | |
| 344 | 347 | { | |
| 345 | - Exceptions.SetError(Exceptions.ImportError, $"No module named {name}"); | ||
| 348 | + Exceptions.SetError(Exceptions.ImportError, originalExceptionMessage); | ||
| 346 | 349 | return IntPtr.Zero; | |
| 347 | 350 | } | |
| 348 | 351 | if (head == null) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments