Skip to content

Fix test_offline's tearDown #3691

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

Merged
merged 1 commit into from
May 1, 2022
Merged

Fix test_offline's tearDown #3691

merged 1 commit into from
May 1, 2022

Conversation

BjoernLudwigPTB
Copy link
Contributor

@BjoernLudwigPTB BjoernLudwigPTB commented Apr 24, 2022

While working on #3690 we discovered that subsequent runs of the test suite produced an error due to incorrect tear down behaviour in test_offline.py. At least this is, what we think is the cause and our fix solved the issue for us.

What had happened:

On 03.06.2019 John Mease introduced some chages in 2a44ce3 including several new tearDown methods for instance for class PlotlyOfflineTestCase(PlotlyOfflineBaseTestCase). The problem with this particular new tearDown() was, that since then it has overridden the parent class tear down method, which was cleaning up after some of the tests. The residual files cause two failing tests on subsequent runs without the introduced patch, which now calls the parent class tearDown in John Mease's from 2019.

This is my second contribution to Plot.ly, so please let me know, if I can improve anything.

As of now the build-doc job keeps failing although I have the impression, that this is unrelated to my changes. Please let me know, if I can do anything to fix this.

Code PR

  • I have read through the contributing notes and understand the structure of the package. In particular, if my PR modifies code of plotly.graph_objects, my modifications concern the codegen files and not generated files.
  • I have added tests (if submitting a new feature or correcting a bug) or
    modified existing tests.
  • For a new feature, I have added documentation examples in an existing or
    new tutorial notebook (please see the doc checklist as well).
  • I have added a CHANGELOG entry if fixing/changing/adding anything substantial.
  • For a new feature or a change in behaviour, I have updated the relevant docstrings in the code to describe the feature or behaviour (please see the doc checklist as well).

@nicolaskruchten
Copy link
Contributor

Thanks very much! Indeed the build-doc step was failing for unrelated reasons :)

@nicolaskruchten nicolaskruchten merged commit b5c4ce2 into plotly:master May 1, 2022
@BjoernLudwigPTB BjoernLudwigPTB deleted the fix_missing_teardowns_for_errorless_subsequent_test_suite_runs branch May 2, 2022 18:25
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.

2 participants