-
Notifications
You must be signed in to change notification settings - Fork 12
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
[WIP] - Update tests #51
base: python3
Are you sure you want to change the base?
Conversation
Thanks so much! I am not a great reviewer for tests. Hopefully @mauritsvanrees will get a chance to look at this. |
# env: PLONE_VERSION=43 | ||
# - python: "2.7" | ||
# env: PLONE_VERSION=51 | ||
# - python: "2.7" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the -python "2.7"
line still needs to be there, otherwise the structure differs from the python3.7/plone52 below it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is far too big to review in depth. But I have glanced at the changes, and added some minor comments, but for the rest it looks good.
Does this include the changes from the python3
branch?
I would indeed say: test this only on Plone 5.2, and both Python 2 and 3. (I guess for Python 3 it is enough to only test on 3.7, not on 3.6.)
But I am not using Poi anymore. (Except maybe still an old version with Plone 4, on a customer server that I cannot reach.)
.travis.yml
Outdated
after_success: | ||
- bin/createcoverage --output-dir=parts/test/coverage | ||
- bin/pip install coverage | ||
- bin/python -m coverage.pickle2json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think pickle2json is not needed anymore, and may break. But not sure.
I don't know if the current coverage setup is okay. I have seen lots of projects where it is not, where a coverage report might be created just fine, but the sending to coveralls fails, probably because the project has not been registered yet. I have not cared enough to check for those projects. Maybe it is fine here.
Thanks @mauritsvanrees. Personally i don't need python2 compatibility because we are porting to plone 52 the (few) sites that is using Poi. Could be a good approach remove python2 compatibility in master version, and keep a python2 branch (the current master) for people that still need it? I still don't know how to convert old-style doctests (into old-tests folder)..any ideas or best practices here? |
When you migrate a site with Poi from Plone 5.1 to 5.2 with the standard inline migration, it goes like this:
You cannot skip the first step. So Poi must work with Python 2. Fixing a few imports should not be so much work. Some helpful documentation: But yes, getting tests to run on both can in some cases be a PITA. For converting to plain unittests: try to split it up. Most doctest files contain several scenarios with some common setup. |
I've updated tests to be aligned with modern ones.
There are some old doctests that i haven't migrated yet because i don't know what could be a good strategy for them. Any suggestions?
Right now i enabled tests only for Plone 5.2..should we have to keep a backward compatibility?