Skip to content

Conversation

avrata
Copy link
Contributor

@avrata avrata commented Apr 21, 2021

The test_plugin_detection test was failing for me in python 2.7 due to a missing importlib.reload(). I believe this is only available in python 3.4+.

This change lets the test fall back to imp.reload() in cases where it can't find the importlib one.

There is a related question about how the 2.7 tests did not detect this which I think is related to a missing mock module. I'll follow up offline about that.

@ssteinbach
Copy link
Collaborator

Very small request - just want to put comments in that are like the other comments in the codebase to make it easier to find this via future Grepping. thanks!

@ssteinbach ssteinbach merged commit acdc1d1 into AcademySoftwareFoundation:master Apr 23, 2021
@ssteinbach ssteinbach changed the title Allow test to run in both python 2.7 and python 3.3+ wrt reloading modules Add Try/Except around imporlib.reload for unit test to run in python2.7 as well as 3.4+ Apr 23, 2021
@ssteinbach ssteinbach added this to the Public Beta 14 milestone Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants