Skip to content

Commit

Permalink
Fix testing for both 2.7 and 3.4
Browse files Browse the repository at this point in the history
While 3.5 is my current python version, there is an issue with wheel
that causes an assert problem. See issue #146 specifically
cp35m-x86_64-linux-gnu in the comments.  It may be marked resolved, but
I am still have a problem with it.
  • Loading branch information
jidn committed Jan 5, 2016
1 parent caeaf6a commit 43b7bd3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
31 changes: 17 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@
# For more information on creating packages for PyPI see the writeup at
# http://peterdowns.com/posts/first-time-with-pypi.html
#
.PHONY: check test clean clean-all upload
PROJECT := Flask-RESTeasy
PACKAGE := flask_resteasy.py

# Python settings
ifndef TRAVIS
PYTHON_MAJOR := 2
PYTHON_MINOR := 7
PYTHON_MAJOR := 3
PYTHON_MINOR := 4
# We assume there is an 'env' directory which 'make env' will build
ENV := env
else
# Use the virtualenv provided by Travis
ENV = $(VIRTUAL_ENV)
endif


# System paths
# I haven't developed for windows for a long time, mileage may vary.
PLATFORM := $(shell python -c 'import sys; print(sys.platform)')
Expand Down Expand Up @@ -51,8 +56,6 @@ PEP257 := $(BIN)/pep257
COVERAGE := $(BIN)/coverage

# Project settings
PROJECT := Flask-RESTeasy
PACKAGE := flask_resteasy.py
SOURCES := Makefile setup.py $(shell find $(PACKAGE) -name '*.py')
EGG_INFO := $(subst -,_,$(PROJECT)).egg-info

Expand All @@ -78,34 +81,34 @@ ci: test
.PHONY: env .virtualenv depends .depends-ci .depends-dev

env: .virtualenv $(EGG_INFO)
$(EGG_INFO): Makefile setup.py
$(EGG_INFO): setup.py
$(PIP) install -e .
touch $(EGG_INFO) # flag to indicate package is installed

.virtualenv: $(PIP) #requirements.txt
.virtualenv: $(PIP)
$(PIP):
$(SYS_VIRTUALENV) --python $(SYS_PYTHON) $(ENV)
@echo "Created virtual environment"

#requirements.txt:
# $(PIP) install --upgrade -r requirements.txt
# @echo "Created virtual environment"


depends: .depends-ci .depends-dev

.depends-ci: env Makefile $(DEPENDS_CI)
$(DEPENDS_CI): Makefile tests/requirements.txt
.depends-ci: env $(DEPENDS_CI)
$(DEPENDS_CI): tests/requirements.txt
$(PIP) install --upgrade flake8 pep257
$(PIP) install -r tests/requirements.txt
touch $(DEPENDS_CI) # flag to indicate dependencies are installed

.depends-dev: env Makefile $(DEPENDS_DEV)
$(DEPENDS_DEV): Makefile
.depends-dev: env $(DEPENDS_DEV)
$(DEPENDS_DEV):
# $(PIP) install --upgrade wheel # pygments wheel
touch $(DEPENDS_DEV) # flag to indicate dependencies are installed

# Static Analysis ############################################################
.PHONY: check flake8 pep257
.PHONY: flake8 pep257

check: flake8 pep257

Expand All @@ -118,7 +121,7 @@ pep257: .depends-ci
$(PEP257) $(PACKAGE) tests --ignore=$(PEP8_IGNORED)

# Testing ####################################################################
.PHONY: test pdb coverage
.PHONY: pdb coverage
PYTESTER := $(BIN)/py.test

PYTESTER_OPTS := --cov $(PACKAGE) \
Expand All @@ -136,7 +139,7 @@ coverage: test
$(OPEN) htmlcov/index.html

# Cleanup ####################################################################
.PHONY: clean clean-env clean-all .clean-build .clean-test .clean-dist
.PHONY: clean-env .clean-build .clean-test .clean-dist

clean: .clean-dist .clean-test .clean-build
rm -rf $(ALL)
Expand Down
2 changes: 1 addition & 1 deletion flask_resteasy.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def delete(self):
from werkzeug.wrappers import Response as ResponseBase


__version__ = "0.0.3.1"
__version__ = "0.0.4"


def unpack(rv):
Expand Down
2 changes: 1 addition & 1 deletion tests/blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def setup_api_blueprint(resource, bp=None, ap=None, rp=None):
# It should fail if tried again
with pytest.raises(ValueError) as e_info:
app.register_blueprint(blueprint, url_prefix=rp)
assert e_info.value.message.endswith("only be registered once.")
assert str(e_info).endswith("only be registered once.")
return app, api


Expand Down

0 comments on commit 43b7bd3

Please sign in to comment.