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

Various test fixes, enable linting in CI, add Python 3.7 compatibility #76

Merged
merged 18 commits into from
Nov 7, 2018

Conversation

pbregener
Copy link
Contributor

@pbregener pbregener commented Oct 1, 2018

This changes various dependencies and test-related files.

  • Updates the pylint dependency which allows us to run the linting tests with Python 3.6
  • Fixes a few warnings emitted after updating pylint
  • Updates other dependencies such as sh and pytest (needed for Python 3.7 compatibility)
  • Adds Travis CI tests using Python 3.7
  • Fixes intermittent test failures in Travis CI (fixes Intermittent test failures make development difficult #77)
  • Enables all tests for all Python versions in Travis CI
  • The failing test for Python 3.7 (using an Ubuntu Xenial image) should be fixed by Make test_target less strict with git #79

@pbregener pbregener changed the title Update pylint, enable linting for Python 3.6 Various test changes, enable linting for Python 3.6 Oct 1, 2018
Copy link
Owner

@jorisroovers jorisroovers left a comment

Choose a reason for hiding this comment

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

Great work, thanks for submitting this. Other than running the integration tests in Travis (which I think we shouldn't do until we figure out #77 as that issue makes it virtually impossible to get Travis to give a thumbs up), this looks good!

Can you just revert the .travis.yml to what it was before (while adding the python 3.7 stuff)? I'll merge right after! Thanks!

@pbregener
Copy link
Contributor Author

Now one integration test even failed for Python 2.6. Should we just globally disable the integration tests in Travis for now?

@pbregener pbregener force-pushed the lint36 branch 2 times, most recently from dce90fd to d363feb Compare October 3, 2018 16:09
@pbregener
Copy link
Contributor Author

This still needs a proper cleanup, but I think I fixed the main integration test issues @jorisroovers! Instead of using assertEqual on the returned object from the sh call (which is not a string), a new function assertEqualStdout takes care of some unicode and linebreak issues.

The one Python 3.7 unit test failure on Travis seems to be reproducible (on Travis), but I cannot reproduce it locally using Python 3.7.0.

I will not have time to work on this the next days or the next week, but feel free to cherry-pick from this, or finish this PR yourself :)

@pbregener pbregener force-pushed the lint36 branch 5 times, most recently from ca02431 to 70a56af Compare October 10, 2018 08:30
@pbregener
Copy link
Contributor Author

Could you review this again @jorisroovers? I think this finally fixes the intermittent failures for all Python versions! Tests for Python 3.7 fail due to a newer git version included in the image used by Travis (but PR #79 fixes that).

@pbregener pbregener changed the title Various test changes, enable linting for Python 3.6 Various test fixes, enable linting in CI, add Python 3.7 compatibility Oct 10, 2018
@pbregener pbregener force-pushed the lint36 branch 4 times, most recently from 6cd8338 to b4d7050 Compare October 10, 2018 09:54
Pelle Bo Regener added 6 commits October 17, 2018 19:01
And use specific pylint version for Python 3.3
When exiting with exit code zero, the `handle_test_result` method
should not print a red FAIL, just because the previous test wrote
something to STDOUT.
Newer pylint versions report more warnings. This fixes some of them,
and ignores quite a few others through `pylint: disable` lines.
When running an old version of pylint with newer options (e.g. to
switch off "new" warnings), pylint would fail. This switches off the
option checking.
This is needed to make pylint work with the full range of Python
versions (and the compatible pylint versions) ranging from Python 2.6
to Python 3.6+.
@pbregener
Copy link
Contributor Author

Hi @jorisroovers! I just updated this to use the very latest version of pytest, and also squashed a few commits. Intermittent test failures are gone. Tests for Python 3.7 will fail until #79 is merged.

Pelle Bo Regener added 10 commits October 24, 2018 21:20
Update wheel to 0.32.2, and
to 0.29.0 (last supported version for Python 2.6 and 3.3),
respectively.

Also remove the check for wheel in run_tests.sh:
With multiple versions specified in requirements.txt, it is not that
trivial anymore to "make sure that wheel is installed".
And to version 3.2.5 for the EOL'd Python versions 2.6 and 3.3.
Instead of using assertEqual on a string and the return object from
the sh call, this introduces another assertion helper function that
compares the STDOUT part from the RunningCommand (see sh docs) to
a string using assertMultiLineEqual. It also replaces CRLF by LF to
avoid potential end-of-line issues.
@pbregener
Copy link
Contributor Author

ping @jorisroovers

@jorisroovers
Copy link
Owner

@pbregener sorry, it's really hard for me to make time to work on this these days. Happy to take your word for it and get this merged for now.

I don't anticipate having proper time to review this, do some of the other work and then push a new release until late December when I will take a holiday though.

If you're interested in taking a more active/overall role on the project (and pinky swear to uphold proper standards ;-) ), I can give you full commit access. Let me know!

@jorisroovers jorisroovers merged commit 20738f9 into jorisroovers:master Nov 7, 2018
@pbregener
Copy link
Contributor Author

Appreciate it @jorisroovers, but I am about to start a new job soon and am therefore pretty busy, too, these days. I have just found gitlint quite useful and created this PR with the hope to help make it more future proof :)

@pbregener pbregener deleted the lint36 branch November 7, 2018 10:50
jorisroovers pushed a commit that referenced this pull request Mar 13, 2019
- Various text fixes all over
- Enable lint tests for Python 3.6
- Fix some pylint warnings
- Ignore pylint errors for bad options
- Use unittest2 only for Python 2
- Test Python 3.7 in Travis
- Integration Tests: Introduce assertEqualStdout
- Activate all integration tests in Travis
- Update dependencies in requirements.txt
jorisroovers pushed a commit that referenced this pull request Mar 13, 2019
- Python 3.7 support
- Python 2.6 no longer supported
- Various dependency updates and under the hood fixes (see #76)

Special thanks to @pbregener for his contributions related to python 3.7 support
and test fixes.

Full Release details in CHANGELOG.md.
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.

Intermittent test failures make development difficult
2 participants