-
Notifications
You must be signed in to change notification settings - Fork 495
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
Introduces CI and tox testing, fixes #679 #794
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
sudo: false | ||
|
||
language: python | ||
|
||
python: | ||
- "2.7" | ||
- "3.6" | ||
|
||
install: pip install tox-travis | ||
|
||
script: tox |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import unittest | ||
from buildozer import Buildozer | ||
|
||
|
||
class TestBuildozer(unittest.TestCase): | ||
|
||
def test_buildozer_base(self): | ||
""" | ||
Basic test making sure the Buildozer object can be instanciated. | ||
""" | ||
buildozer = Buildozer() | ||
self.assertEqual(buildozer.specfilename, 'buildozer.spec') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test will not catch #791 yet because |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[tox] | ||
envlist = pep8,py27,py36 | ||
|
||
[testenv] | ||
commands = | ||
python -m unittest discover --top-level-directory=. --start-directory=tests/ | ||
|
||
[testenv:pep8] | ||
deps = flake8 | ||
commands = flake8 buildozer/ | ||
|
||
[flake8] | ||
ignore = | ||
E121, E122, E123, E125, E126, E127, E128, E129, E131, E226, E231, E241, | ||
E262, E265, E301, E302, E303, E305, E402, E501, E502, E722, E731, E741, | ||
F401, F821, F841, W391, W504, W605 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We will fix the most important errors little by little in subsequent pull requests |
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'll purposely go for
3.6
rather because3.7
still feels too cutting edge to me and 3.6 more mainstream while not legacyThere 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.
Not sure I agree with that. 3.7 is the current python release, and it's what gets installed by default if I ask for python3 in many places (e.g. my main use case:
conda create -n new_environment python=3 ...
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.
Not on Ubuntu 18.04 LTS. Plus it's failing a lot of recipes, e.g. gevent, and when you check on upstream they say, we don't support 3.7 yet. But yes that's debatable.
In any case this PR is not about dropping some support, but more like adding testing where we had none.
Edit: thanks for the feedback by the way, very much appreciated!