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

ShowPrices doctest is failing #513

Merged
merged 4 commits into from
Dec 30, 2017
Merged

ShowPrices doctest is failing #513

merged 4 commits into from
Dec 30, 2017

Conversation

xispa
Copy link
Member

@xispa xispa commented Dec 29, 2017

Description of the issue/feature this PR addresses

Doctest ShowPrices.rst fails. Added a delay of 1 second after transaction.commit()

Linked issue: ShowPrices doctest is failing #463

Current behavior before PR

$ bin/test -t ShowPrices
Failure in test /home/travis/build/senaite/bika.lims/bika/lims/tests/doctests/ShowPrices.rst
Traceback (most recent call last):
  File "/usr/lib/python2.7/unittest/case.py", line 331, in run
    testMethod()
  File "/usr/lib/python2.7/doctest.py", line 2226, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for ShowPrices.rst
  File "/home/travis/build/senaite/bika.lims/bika/lims/tests/doctests/ShowPrices.rst", line 0
----------------------------------------------------------------------
File "/home/travis/build/senaite/bika.lims/bika/lims/tests/doctests/ShowPrices.rst", line 169, in ShowPrices.rst
Failed example:
    True if "409" not in browser.contents else "Accreditation listing should not have Price column, but it is visible."
Differences (ndiff with -expected +actual):
    - True
    + 'Accreditation listing should not have Price column, but it is visible.'
----------------------------------------------------------------------
File "/home/travis/build/senaite/bika.lims/bika/lims/tests/doctests/ShowPrices.rst", line 185, in ShowPrices.rst
Failed example:
    True if "409" not in browser.contents else "Profile Analyses should NOT be showing Price."
Differences (ndiff with -expected +actual):
    - True
    + 'Profile Analyses should NOT be showing Price.'
----------------------------------------------------------------------
File "/home/travis/build/senaite/bika.lims/bika/lims/tests/doctests/ShowPrices.rst", line 201, in ShowPrices.rst
Failed example:
    True if "409"  not in browser.contents else "AR Templates should NOT be showing Price."
Differences (ndiff with -expected +actual):
    - True
    + 'AR Templates should NOT be showing Price.'

Desired behavior after PR is merged

$ bin/test -t ShowPrices

Running bika.lims.testing.BikaLIMSLayer:Functional tests:
  Set up plone.testing.zca.LayerCleanup in 0.000 seconds.
  Set up plone.testing.z2.Startup in 0.212 seconds.
  Set up plone.app.testing.layers.PloneFixture in 13.703 seconds.
  Set up bika.lims.testing.BikaLIMSLayer in 15.807 seconds.
  Set up bika.lims.testing.BikaLIMSLayer:Functional in 0.000 seconds.
  Running:
    1/1 (100.0%)/xispa/zinstance/src/bika.lims/bika/lims
                
  Ran 1 tests with 0 failures and 0 errors in 32.571 seconds.

Tearing down left over layers:
  Tear down bika.lims.testing.BikaLIMSLayer:Functional in 0.000 seconds.
  Tear down bika.lims.testing.BikaLIMSLayer in 0.005 seconds.
  Tear down plone.app.testing.layers.PloneFixture in 0.051 seconds.
  Tear down plone.testing.z2.Startup in 0.005 seconds.
  Tear down plone.testing.zca.LayerCleanup in 0.002 seconds.

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

Copy link
Contributor

@ramonski ramonski left a comment

Choose a reason for hiding this comment

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

Cool, let's see if this trick works out for Travis

@ramonski ramonski merged commit c7ceaa1 into senaite:master Dec 30, 2017
@xispa xispa deleted the i463 branch December 31, 2017 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants