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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mechanical fix/workaround for tests/tools/pyroma/test_pyroma_tool.py #658

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

valeriupredoi
Copy link

@valeriupredoi valeriupredoi commented Apr 4, 2024

Description

This PR provides a mechanical fix/workaround (ie not a fix at the root cause, please see below for reasoning) for the failed test

Testing steps

  • tested locally (on my machine) following the test steps from the Github Action (GA) workflow: result: 100% pass rate
  • tested on GA via my personal fork: I replicated the test failure one can see on the main master

Clues: the files.files are identical on both machines; the messages indeed differ by two elements:

  • Files and messages on local machine:
[PosixPath('/home/valeriu/prospector-fork/tests/tools/pyroma/testdata/pkg1/__init__.py'), PosixPath('/home/valeriu/prospector-fork/tests/tools/pyroma/testdata/pkg1/this_one_is_fine/setup.py'), PosixPath('/home/valeriu/prospector-fork/tests/tools/pyroma/testdata/pkg1/this_one_is_fine/__init__.py')]
[pyroma-PYR05, pyroma-PYR06, pyroma-PYRUNKNOWN, pyroma-PYR09, pyroma-PYR12, pyroma-PYR05, pyroma-PYR06, pyroma-PYRUNKNOWN, pyroma-PYR09, pyroma-PYR12]
  • Files and messages on GA machine:
[PosixPath('/home/runner/work/prospector/prospector/tests/tools/pyroma/testdata/pkg1/__init__.py'), PosixPath('/home/runner/work/prospector/prospector/tests/tools/pyroma/testdata/pkg1/this_one_is_fine/__init__.py'), PosixPath('/home/runner/work/prospector/prospector/tests/tools/pyroma/testdata/pkg1/this_one_is_fine/setup.py')]
[pyroma-PYR05, pyroma-PYR06, pyroma-PYRUNKNOWN, pyroma-PYR09, pyroma-PYR12, pyroma-PYRUNKNOWN, pyroma-PYR05, pyroma-PYR06, pyroma-PYRUNKNOWN, pyroma-PYR09, pyroma-PYR12, pyroma-PYRUNKNOWN]

As you can see, the GA results include two additional pyroma-PYRUNKNOWN members in the messages list. My theory is that the setup.py file gets a little bit altered (trailing space character, newline character etc - could be anything non-major - something minor) which gives differing results at the point of pyroma run. File system peculiarities, I reckon.

PS: I've kept the change to the GA workflow file for possible further testing, I'll remove that if this will get merged. Cheers, fellas 馃嵑

Related Issue

This failing test needs be fixed so we can get #645 in and consequently release a version that supports Python 3.12

Motivation and Context

Fixes failing test tests/tools/pyroma/test_pyroma_tool.py

How Has This Been Tested?

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.
  • My change requires a change to the dependencies
  • I have updated the dependencies accordingly
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@Pierre-Sassoulas
Copy link
Collaborator

Thank you for your work @valeriupredoi. I don't have enough knowledge of prospector to review that, sorry.

@valeriupredoi
Copy link
Author

@Pierre-Sassoulas not a problem at all, mate. Can any other of the prospector core devs review maybe? 馃嵑

@Pierre-Sassoulas
Copy link
Collaborator

@carlio would you mind reviewing this to unblock python 3.12 support down the line, please ? :)

@valeriupredoi
Copy link
Author

am just a bit worried that @carlio 's been off GH scope for many months, do hope he's on a nice sabbatical/holiday 馃憤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants