-
Notifications
You must be signed in to change notification settings - Fork 53
updated travis config #62
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
Conversation
m8ttyB
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me
b4handjr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments.
.travis.yml
Outdated
| include: | ||
| - stage: | ||
| language: python | ||
| python: 3.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to set a current python version for legacy, which should be 2.7.12. The default one is 2.7.6
| python: 3.6 | ||
| env: TOXENV=py3 | ||
| before_install: | ||
| - wget -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v0.20.0/geckodriver-v0.20.0-linux64.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should only need this once.
| axe = Axe(selenium) | ||
| axe.inject() | ||
| data = axe.execute() | ||
| assert data is not None, data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you look for something specific here? Checking for not None isn't really a test.
| """Assert that run method returns results.""" | ||
| axe = Axe(selenium) | ||
| violations = axe.run() | ||
| assert violations is not None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
| violations = axe.run() | ||
|
|
||
| report = axe.report(violations) | ||
| assert report is not None, report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
| def test_get_rules(axe): | ||
| def test_get_rules(selenium): | ||
| """Assert number of rule tests matches number of available rules.""" | ||
| axe = Axe(selenium) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could probably get it's own fixture since it seems to be called for each test.
| - mkdir $HOME/geckodriver && tar xvf /tmp/geckodriver.tar.gz -C $HOME/geckodriver | ||
| - export PATH=$HOME/geckodriver:$PATH | ||
| - firefox --version | ||
| - geckodriver --version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you aren't starting any kind of window manager. If you don't want these to run headless, you need to start a window management service. See this.
Or you could run firefox as headless using the env variable MOZ_HEADLESS=1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did try setting MOZ_HEADLESS=1, and I'm still seeing the same error.
As far as checking for not None, I'm not really sure what to check for, unless I save JSON data and check the new data against that.
I really just want to see if it returns anything.
What do you suggest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could either have firefox open a page within a directory or you could use this.
| # You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
|
||
| from os import path | ||
| import pytest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should follow PEP8 for import order.
72271a1 to
7647d51
Compare
.travis.yml
Outdated
| - MOZ_HEADLESS=1 | ||
| addons: | ||
| firefox: latest-nightly | ||
| env: TOXENV=py27 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have 2 env properties here. I don't think headless is being set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a-ha. Thanks for that catch
.travis.yml
Outdated
| - MOZ_HEADLESS=1 | ||
| addons: | ||
| firefox: latest-nightly | ||
| env: TOXENV=py3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 env properties here as well.
No description provided.