Skip to content

Commit

Permalink
update to pytest 3
Browse files Browse the repository at this point in the history
  • Loading branch information
hartym committed Oct 2, 2016
1 parent 03cfe12 commit 8f5a123
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 21 deletions.
5 changes: 3 additions & 2 deletions Makefile
@@ -1,7 +1,7 @@
# This file has been auto-generated.
# All changes will be lost, see Projectfile.
#
# Updated at 2016-07-16 12:23:40.296950
# Updated at 2016-10-02 09:42:38.944882

PYTHON ?= $(shell which python)
PYTHON_BASENAME ?= $(shell basename $(PYTHON))
Expand All @@ -10,6 +10,7 @@ PYTHON_REQUIREMENTS_DEV_FILE ?= requirements-dev.txt
QUICK ?=
VIRTUAL_ENV ?= .virtualenv-$(PYTHON_BASENAME)
PIP ?= $(VIRTUAL_ENV)/bin/pip
PYTEST ?= $(VIRTUAL_ENV)/bin/pytest
PYTEST_OPTIONS ?= --capture=no --cov=edgy/event --cov-report html
SPHINX_OPTS ?=
SPHINX_BUILD ?= $(VIRTUAL_ENV)/bin/sphinx-build
Expand Down Expand Up @@ -45,7 +46,7 @@ lint: install-dev
$(VIRTUAL_ENV)/bin/pylint --py3k edgy.event -f html > pylint.html

test: install-dev
$(VIRTUAL_ENV)/bin/py.test $(PYTEST_OPTIONS) tests
$(PYTEST) $(PYTEST_OPTIONS) tests

doc: install-dev
$(SPHINX_BUILD) -b html -D latex_paper_size=a4 $(SPHINX_OPTS) $(SPHINX_SOURCEDIR) $(SPHINX_BUILDDIR)/html
4 changes: 2 additions & 2 deletions Projectfile
Expand Up @@ -21,11 +21,11 @@ enable_features = {

extras_require = {
'dev': [
'coverage >=4.0,<4.2',
'coverage >=4.2,<4.3',
'mock >=2.0,<2.1',
'nose >=1.3,<1.4',
'pylint >=1.6,<1.7',
'pytest >=2.9,<2.10',
'pytest >=3.0,<3.1',
'pytest-cov >=2.3,<2.4',
'sphinx',
'sphinx_rtd_theme',
Expand Down
24 changes: 7 additions & 17 deletions setup.py
Expand Up @@ -10,37 +10,27 @@ def read(filename, flt=None):
content = f.read().strip()
return flt(content) if callable(flt) else content

def requirements_filter(c):
install_requires = []
for requirement in tolines(c):
_pos = requirement.find('#egg=')
if _pos != -1:
requirement = requirement[_pos+5:].strip()
_pos = requirement.find('#')
if _pos != -1:
requirement = requirement[0:_pos].strip()
if len(requirement):
install_requires.append(requirement)
return install_requires

version = read('version.txt')
try:
version = read('version.txt')
except:
version = 'dev'

setup(
name = 'edgy.event',
description = 'Event dispatcher',
license = 'Apache License, Version 2.0',
install_requires = [],
namespace_packages = ['edgy'],
namespace_packages = [u'edgy'],
version = version,
long_description = read('README.rst'),
classifiers = read('classifiers.txt', tolines),
packages = find_packages(exclude=['ez_setup', 'example', 'test']),
include_package_data = True,
extras_require = {'dev': ['coverage >=4.0,<4.2',
extras_require = {'dev': ['coverage >=4.2,<4.3',
'mock >=2.0,<2.1',
'nose >=1.3,<1.4',
'pylint >=1.6,<1.7',
'pytest >=2.9,<2.10',
'pytest >=3.0,<3.1',
'pytest-cov >=2.3,<2.4',
'sphinx',
'sphinx_rtd_theme']},
Expand Down
Empty file added tests/.gitkeep
Empty file.

0 comments on commit 8f5a123

Please sign in to comment.