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

Upgrade to PyTest 7.0 #89

Closed
8 tasks done
BethanyG opened this issue Feb 10, 2022 · 0 comments · Fixed by #105
Closed
8 tasks done

Upgrade to PyTest 7.0 #89

BethanyG opened this issue Feb 10, 2022 · 0 comments · Fixed by #105

Comments

@BethanyG
Copy link
Member

BethanyG commented Feb 10, 2022

To Do List:

  • Figure out why using Pytest 7.0 causes the CI/test runs to fail.
    Pytest uses tomli instead of toml. The plugin we define (and the data.py file we use as a helper) needed to change to import and use tomli.
  • Fix any issues with test generation and test running linked to the failures.
    These were fixed as part of fixing the CI for the content repo. See this PR for the fixes that went into the Python content repo CI.
  • Test that exercise tests & exercise code are all ok when used with the new version
    There don't appear to be errors..but we should probably be more formal with the testing.
  • Test to make sure that upgrading doesn't cause issues with any Python version 3.6 - 3.9 (since our CI tests against those versions)
    This was done as part of the fix to the content repo CI. We'll need to pin version 7.0.1 to make sure that Python 3.6 compatibility is maintained.
  • Change/update test files where needed
    This has effectively happened with the upgrade on the content repo CI. The runner code doesn't explicitly import tomli, but generate_exercises.py does, as does the code that tests exercises - so those dependancies were upgraded, as was Pytest for the CI.
  • Check requirements and dependancies for the test runner, and make sure everything is compatible (update where needed)
  • Repin the PyTest version in requirements.txt
    Pin Pytest Version to 7.0 #96 re-pins at the latest version to support Python 3.6, which is 7.0.1
  • Regenerate golden files for the test runner tests where needed
    See [Golden Tests]: Fix Failures with example-syntax-error #97 -- there is a subtle problem with the example-syntax-error golden test suite.

This also might include possible changes to the data.py code in this repo (because of toml vs tomli) and in the Python repo (for the same reasons)

Suspect it's the use of tomli in PyTest 7.0 that is causing issues. Currently, we are using the toml module, and our runner is implemented as a PyTest plugin. So the plugin cannot find or access the tomli, because it's looking for the toml.

See Issue 2892 in the Python repo for some troubleshooting context.
See also Issue 88 in this repo for troubleshooting context.

But that's only theory right now.

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 a pull request may close this issue.

1 participant