Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix check_python_import() #396

Merged

Conversation

aaronchantrill
Copy link
Contributor

Description

The file diagnose.py has a test called check_python_import which is run during the unit testing. This function is failing with the message "'FrozenImporter' has no attribute 'get_filename'".

Apparently pkgutil.get_loader() can return different types of loaders.

Related Issue

Error "'FrozenImporter' has no attribute 'get_filename'" when running unit tests #395

Motivation and Context

This fixes an issue creating false failures on unit tests.

How Has This Been Tested?

Tested on Raspberry Pi 5 and x86_64 laptop. This should not affect other areas of the code.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

The file diagnose.py has a test called check_python_import which
is run during the unit testing. This function is failing with the
message "'FrozenImporter' has no attribute 'get_filename'".

Apparently pkgutil.get_loader() can return different types of
loaders.
@aaronchantrill aaronchantrill self-assigned this Feb 17, 2024
@aaronchantrill aaronchantrill merged commit 087c874 into NaomiProject:naomi-dev Feb 18, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error "'FrozenImporter' has no attribute 'get_filename'" when running unit tests
1 participant