Skip to content
This repository has been archived by the owner on May 14, 2018. It is now read-only.

Fix unit tests and configure tox/Travis #16

Merged
merged 8 commits into from
Mar 21, 2017
Merged

Fix unit tests and configure tox/Travis #16

merged 8 commits into from
Mar 21, 2017

Conversation

chosak
Copy link
Member

@chosak chosak commented Mar 21, 2017

This PR fixes the unit tests in hud_api_replace.tests which referenced a bunch of long-since-deprecated Google Geocoder code. It also sets up a tox.ini and .travis.yml that allows for testing against Python 2 & 3 and Django 1.8 & 1.10.

To run the full unit test matrix:

$ tox

To run against a specific version:

$ tox -e py27-dj18
..............................................................
----------------------------------------------------------------------
Ran 62 tests in 0.046s

OK

There's also a flake8 environment which can be run by invoking tox flake8 but there are currently numerous errors; those fixes are out of scope for this PR.

As part of these fixes this PR also moves existing migrations from South to Django; legacy databases will need to be migrated with manage.py migrate --fake-initial.

@chosak
Copy link
Member Author

chosak commented Mar 21, 2017

Also added use of setuptools-git-version in 51bb37c to better define package versions - thanks @rosskarchner.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling d75cbdd on fix-tests into ** on master**.

python: 2.7
- env: TOXENV=py27-dj110
python: 2.7
- env: TOXENV=py35-dj18
Copy link
Member

Choose a reason for hiding this comment

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

I wonder what the right answer is for testing against 3.x Python's. My machine doesn't have 3.5, for example (i have 3.6 via Homebrew)

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question. I have 3.5 via Homebrew. We can try to standardize against a Python 3 version - I know right now wagtail-flags and wagtail-sharing use Python 3.5, but that might be due to an arbitrary choice as opposed to a deliberate selection.

@chosak chosak merged commit 6be3604 into master Mar 21, 2017
@chosak chosak deleted the fix-tests branch March 21, 2017 19:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants