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

Add conftest.py to avoid absl.flags._exceptions.UnparsedFlagAccessError #6930

Merged
merged 26 commits into from
Oct 21, 2024

Conversation

nikelite
Copy link
Contributor

@nikelite nikelite commented Oct 16, 2024

  • Add conftest.py to avoid absl.flags._exceptions.UnparsedFlagAccessError
  • Re-enable related unit-tests

Copy link
Contributor

@peytondmurray peytondmurray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes don't look like they modify the pytest configuration - did I miss something here? Only looks like install constraints were changed.

@peytondmurray peytondmurray removed their assignment Oct 19, 2024
@nikelite nikelite changed the title Add pytest config to avoid absl.flags._exceptions.UnparsedFlagAccessError Add conftest.py to avoid absl.flags._exceptions.UnparsedFlagAccessError Oct 20, 2024
@nikelite
Copy link
Contributor Author

These changes don't look like they modify the pytest configuration - did I miss something here? Only looks like install constraints were changed.

Sorry for the confusion. I've added a conftest.py file that prevents the UnparsedFlagAccessError from being raised during pytest execution, and I've updated the PR title to reflect this change.

tfx/conftest.py Outdated
from absl import flags

def pytest_configure(config):
del config
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This deletes the pytest Config object - how come this is needed here? Won't this destroy all pytest and pytest plugin configuration?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially thought the config object was only used within the function, but to prevent potential issues, I've removed it. Thanks!

@nikelite nikelite merged commit c08360b into tensorflow:master Oct 21, 2024
14 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.

3 participants