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

Test module importing on Travis #2671

Merged
merged 6 commits into from
Oct 8, 2015
Merged

Conversation

blink1073
Copy link
Contributor

No description provided.

@goanpeca
Copy link
Member

goanpeca commented Sep 6, 2015

Only 5 commit to get it right 😉 hehe

@blink1073
Copy link
Contributor Author

Travis is so much fun...

fi
if [[ $f == spyderlib/widgets/*.py ]]; then
continue
fi
Copy link
Member

Choose a reason for hiding this comment

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

If you are skipping widgets and plugins, what are you exactly testing here?

Sorry, I don't get it :-)

@ccordoba12
Copy link
Member

@blink1073, could you explain what's the purpose of this PR? It's not that clear to me :-)

@blink1073
Copy link
Contributor Author

A lot of the modules have assert statements in them when run as __main__, this was a start at at least making sure those were still valid. I ran in to trouble with QApplication errors with widgets and plugins, so I skipped those for now.

@goanpeca
Copy link
Member

goanpeca commented Oct 8, 2015

@blink1073 are the errors by any chance qtawesome related??

@blink1073
Copy link
Contributor Author

For instance, widgets/arraybuilder brings up a dialog that would need to be closed.

+ python spyderlib/plugins/__init__.py
QPixmap: Must construct a QApplication before a QPaintDevice
+ python spyderlib/qt/QtCore.py
Traceback (most recent call last):
  File "spyderlib/qt/QtCore.py", line 9, in <module>
    if os.environ['QT_API'] == 'pyqt5':
  File "/Users/ssilvester/anaconda/lib/python3.4/os.py", line 633, in __getitem__
    raise KeyError(key) from None
KeyError: 'QT_API'

@ccordoba12
Copy link
Member

Thanks @blink1073 for the clarification. This is really important work because with it we can also start testing widgets and plugins, by using @goanpeca's trick of setting a timer to close a QApplication after a certain time! :-)

Thanks a lot for it!!

ccordoba12 added a commit that referenced this pull request Oct 8, 2015
Test module importing on Travis
@ccordoba12 ccordoba12 merged commit 0a9353c into spyder-ide:master Oct 8, 2015
@ccordoba12
Copy link
Member

There are errors detected by Travis after this PR, but I'll fix them on the other PR I'm working on :-)

@blink1073 blink1073 deleted the test-imports branch January 15, 2016 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants