plone / plone.batching

Batching facilities for Plone
https://pypi.org/project/plone.batching
2 stars 8 forks source link

Fix navlist different in Python2 and Python 3 #23

Closed ale-rt closed 6 years ago

ale-rt commented 6 years ago

Fixes #21 tests already added on #22

ale-rt commented 6 years ago

With this PR the tests merged in #22 will run in both Python 3

[ale@emily plone3]$ .tox/py36/bin/test -s plone.batching 
Running zope.testrunner.layer.UnitTests tests:
  Set up zope.testrunner.layer.UnitTests in 0.000 seconds.
  Running:
    20/33 (60.6%)/home/ale/Code/plone/plone3/src/plone.batching/plone/batching/tests.py:199: DeprecationWarning: Please use assertEqual instead.
  self.assertEquals(batch.multiple_pages, False)

  Ran 33 tests with 0 failures, 0 errors, 0 skipped in 0.114 seconds.
Tearing down left over layers:
  Tear down zope.testrunner.layer.UnitTests in 0.000 seconds.

and Python 2

[ale@emily plone3]$ .tox/py27/bin/test -s plone.batching 
/home/ale/.buildout/eggs/AccessControl-4.0b4-py2.7-linux-x86_64.egg/AccessControl/ZopeGuards.py:46: DeprecationWarning: the sets module is deprecated
  import sets
Running zope.testrunner.layer.UnitTests tests:
  Set up zope.testrunner.layer.UnitTests in 0.000 seconds.
  Running:

  Ran 33 tests with 0 failures, 0 errors, 0 skipped in 0.118 seconds.
Tearing down left over layers:
  Tear down zope.testrunner.layer.UnitTests in 0.000 seconds.
ale-rt commented 6 years ago

This should also fix https://jenkins.plone.org/view/PLIPs/job/plip-py3/761/testReport/Products.CMFPlone.tests.testBatch/TestBatch/test_batch_lazy_map/

ale-rt commented 6 years ago

Thanks!