Skip to content

Commit

Permalink
Adopt src layout
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus committed Oct 4, 2019
1 parent 894db99 commit 4a661d5
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ docs/_build/
# Virtual Envs
.env*

_pytest_mock_version.py

# IDE
.idea
/src/pytest_mock/_version.py
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
from io import open

from setuptools import setup
from setuptools import setup, find_packages

setup(
name="pytest-mock",
entry_points={"pytest11": ["pytest_mock = pytest_mock"]},
py_modules=["pytest_mock", "_pytest_mock_version"],
packages=find_packages(where="src"),
package_dir={"": "src"},
platforms="any",
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
install_requires=["pytest>=2.7", 'mock;python_version<"3.0"'],
use_scm_version={"write_to": "_pytest_mock_version.py"},
use_scm_version={"write_to": "src/pytest_mock/_version.py"},
setup_requires=["setuptools_scm"],
url="https://github.com/pytest-dev/pytest-mock/",
license="MIT",
Expand Down
2 changes: 2 additions & 0 deletions src/pytest_mock/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from pytest_mock.plugin import *
from pytest_mock.plugin import _get_mock_module
2 changes: 1 addition & 1 deletion pytest_mock.py → src/pytest_mock/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import pytest

from _pytest_mock_version import version
from ._version import version

__version__ = version

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ passenv = USER USERNAME
deps =
coverage
commands =
coverage run --append --source=pytest_mock.py -m pytest test_pytest_mock.py
coverage run --append --source={envsitepackagesdir}/pytest_mock -m pytest tests

[testenv:norewrite]
commands =
pytest test_pytest_mock.py --assert=plain
pytest tests --assert=plain

[testenv:linting]
skipsdist = True
Expand Down

0 comments on commit 4a661d5

Please sign in to comment.