#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re

from setuptools import setup, find_packages
from codecs import open

requires = [
    'click',
    'cookiecutter',
    'jupyter',
    'networkx',
    'numpy',
    'pandas',
    'tornado >= 4.2, < 5.0.0',
    'tqdm',
]

extras_require = {
    'dev': [
        'coverage',
        'flake8',
        'nose',
        'sphinx',
    ],
    'docs': [
        'sphinx',
    ]
}

version = ''
with open('mesa/__init__.py', 'r') as fd:
    version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
                        fd.read(), re.MULTILINE).group(1)

with open('README.rst', 'rb', encoding='utf-8') as f:
    readme = f.read()

setup(
    name='Mesa',
    version=version,
    description="Agent-based modeling (ABM) in Python 3+",
    long_description=readme,
    author='Project Mesa Team',
    author_email='projectmesa@googlegroups.com',
    url='https://github.com/projectmesa/mesa',
    packages=find_packages(),
    package_data={'mesa': ['visualization/templates/*.html', 'visualization/templates/css/*',
                           'visualization/templates/fonts/*', 'visualization/templates/js/*'],
                  'cookiecutter-mesa': ['cookiecutter-mesa/*']},
    include_package_data=True,
    install_requires=requires,
    extras_require=extras_require,
    keywords='agent based modeling model ABM simulation multi-agent',
    license='Apache 2.0',
    zip_safe=False,
    classifiers=[
        'Topic :: Scientific/Engineering',
        'Topic :: Scientific/Engineering :: Artificial Life',
        'Topic :: Scientific/Engineering :: Artificial Intelligence',
        'Intended Audience :: Science/Research',
        'Programming Language :: Python :: 3 :: Only',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: OS Independent',
        'Development Status :: 3 - Alpha',
        'Natural Language :: English',
    ],
    entry_points='''
        [console_scripts]
        mesa=mesa.main:cli
    ''',
)

setup.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re

from setuptools import setup, find_packages
from codecs import open

requires = [
    'click',
    'cookiecutter',
    'jupyter',
    'networkx',
    'numpy',
    'pandas',
    'tornado >= 4.2, < 5.0.0',
    'tqdm',
]

extras_require = {
    'dev': [
        'coverage',
        'flake8',
        'pytest',
        'pytest-cov',
        'sphinx',
    ],
    'docs': [
        'sphinx',
    ]
}

version = ''
with open('mesa/__init__.py', 'r') as fd:
    version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
                        fd.read(), re.MULTILINE).group(1)

with open('README.rst', 'rb', encoding='utf-8') as f:
    readme = f.read()

setup(
    name='Mesa',
    version=version,
    description="Agent-based modeling (ABM) in Python 3+",
    long_description=readme,
    author='Project Mesa Team',
    author_email='projectmesa@googlegroups.com',
    url='https://github.com/projectmesa/mesa',
    packages=find_packages(),
    package_data={'mesa': ['visualization/templates/*.html', 'visualization/templates/css/*',
                           'visualization/templates/fonts/*', 'visualization/templates/js/*'],
                  'cookiecutter-mesa': ['cookiecutter-mesa/*']},
    include_package_data=True,
    install_requires=requires,
    extras_require=extras_require,
    keywords='agent based modeling model ABM simulation multi-agent',
    license='Apache 2.0',
    zip_safe=False,
    classifiers=[
        'Topic :: Scientific/Engineering',
        'Topic :: Scientific/Engineering :: Artificial Life',
        'Topic :: Scientific/Engineering :: Artificial Intelligence',
        'Intended Audience :: Science/Research',
        'Programming Language :: Python :: 3 :: Only',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: OS Independent',
        'Development Status :: 3 - Alpha',
        'Natural Language :: English',
    ],
    entry_points='''
        [console_scripts]
        mesa=mesa.main:cli
    ''',
)

setup.py
diff --git a/.travis.yml b/.travis.yml
index 1f7f1b2d0a2..88cacd47b7a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,11 +13,12 @@ install:
   - pip install coveralls
   - pip install .[dev]
 script:
+  - export PYTHONPATH=$PYTHONPATH:$(pwd)
   # * E501 - line length limit
   # * E123 - indentation on data structures
   # * W504 - line break after binary operator
   - flake8 . --ignore=F403,E501,E123,E128,W504 --exclude=docs,build
-  - nosetests --with-coverage --cover-package=mesa
+  - py.test --cov=mesa tests/
   # - ./tests/test_end_to_end_viz.sh  # needs to be investigated on why this took forever
 after_success:
   - coveralls
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 5fdf4c48608..59604960cbd 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -58,13 +58,13 @@ To ensure that your submission will not break the build, you will need to instal
 
 .. code-block:: bash
 
-    pip install flake8 nose
+    pip install flake8 pytest pytest-cov
 
 We test by implementing simple models and through traditional unit tests in the tests/ folder. The following only covers unit tests coverage. Ensure that your test coverage has not gone down. If it has and you need help, we will offer advice on how to structure tests for the contribution.
 
 .. code-block:: bash
 
-    nosetests --with-coverage --cover-package=mesa
+    py.test --cov=mesa tests/
 
 With respect to code standards, we follow `PEP8`_ and the `Google Style Guide`_. If the command below generates errors, fix all errors that are returned.
 
diff --git a/setup.py b/setup.py
index c9f8d892f94..e230ff3d3b4 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,8 @@
     'dev': [
         'coverage',
         'flake8',
-        'nose',
+        'pytest',
+        'pytest-cov',
         'sphinx',
     ],
     'docs': [

Update tests to use pytest, not nose
Update tests to use pytest, not nose. nose is not maintained anymore. 
