Skip to content

Commit

Permalink
Merge 13119c5 into 73babe3
Browse files Browse the repository at this point in the history
  • Loading branch information
AWhetter committed Oct 12, 2019
2 parents 73babe3 + 13119c5 commit d0e5e8c
Show file tree
Hide file tree
Showing 149 changed files with 15 additions and 20 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Expand Up @@ -3,5 +3,5 @@ include README.rst
include COPYING
include COPYING.LESSER
include pytest.ini
recursive-include astroid/tests *.py *.zip *.egg *.pth
recursive-include tests *.py *.zip *.egg *.pth
recursive-include astroid/brain *.py
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -2,4 +2,4 @@
test = pytest

[tool:pytest]
testpaths = astroid/tests
testpaths = tests
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -42,7 +42,7 @@ def install():
python_requires=">=3.5.*",
install_requires=install_requires,
extras_require=extras_require,
packages=find_packages(exclude=["astroid.tests"]) + ["astroid.brain"],
packages=find_packages() + ["astroid.brain"],
setup_requires=["pytest-runner"],
test_suite="test",
tests_require=["pytest"],
Expand Down
File renamed without changes.
9 changes: 2 additions & 7 deletions astroid/tests/resources.py → tests/resources.py
Expand Up @@ -9,22 +9,17 @@
import os
import sys

import pkg_resources

from astroid import builder
from astroid import MANAGER
from astroid.bases import BUILTINS
from astroid import tests


DATA_DIR = os.path.join("testdata", "python{}".format(sys.version_info[0]))
RESOURCE_PATH = os.path.join(tests.__path__[0], DATA_DIR, "data")
RESOURCE_PATH = os.path.join(os.path.dirname(__file__), DATA_DIR, "data")


def find(name):
return pkg_resources.resource_filename(
"astroid.tests", os.path.normpath(os.path.join(DATA_DIR, name))
)
return os.path.normpath(os.path.join(os.path.dirname(__file__), DATA_DIR, name))


def build_file(path, modname=None):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -28,7 +28,7 @@
from astroid import nodes
from astroid import test_utils
from astroid import util
from astroid.tests import resources
from . import resources

MANAGER = manager.AstroidManager()
BUILTINS = builtins.__name__
Expand Down
File renamed without changes.
Expand Up @@ -42,7 +42,7 @@
from astroid import objects
from astroid import test_utils
from astroid import util
from astroid.tests import resources
from . import resources


def get_node_of_class(start_from, klass):
Expand Down
Expand Up @@ -16,7 +16,7 @@
from astroid import exceptions
from astroid import nodes
from astroid import scoped_nodes
from astroid.tests import resources
from . import resources


class LookupTest(resources.SysPathSetup, unittest.TestCase):
Expand Down
Expand Up @@ -24,7 +24,7 @@
import astroid
from astroid import exceptions
from astroid import manager
from astroid.tests import resources
from . import resources


BUILTINS = six.moves.builtins.__name__
Expand Down
Expand Up @@ -28,7 +28,7 @@
import astroid
from astroid.interpreter._import import spec
from astroid import modutils
from astroid.tests import resources
from . import resources


def _get_file_from_object(obj):
Expand Down
Expand Up @@ -37,7 +37,7 @@
from astroid import util
from astroid import test_utils
from astroid import transforms
from astroid.tests import resources
from . import resources


abuilder = builder.AstroidBuilder()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -22,8 +22,8 @@
from astroid.raw_building import build_module
from astroid.manager import AstroidManager
from astroid.test_utils import require_version
from astroid.tests import resources
from astroid import transforms
from . import resources

try:
import numpy # pylint: disable=unused-import
Expand Down
Expand Up @@ -46,7 +46,7 @@
)
from astroid.bases import BUILTINS, Instance, BoundMethod, UnboundMethod, Generator
from astroid import test_utils
from astroid.tests import resources
from . import resources


def _test_dict_interface(self, node, test_attr):
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tox.ini
Expand Up @@ -36,12 +36,12 @@ commands =
; installed astroid package
; This is important for tests' test data which create files
; inside the package
python -Wi {envsitepackagesdir}/coverage run -m pytest --pyargs astroid/tests {posargs:}
python -Wi {envsitepackagesdir}/coverage run -m pytest --pyargs {posargs:tests}

[testenv:formatting]
basepython = python3
deps = black==18.6b4
commands = black --check --exclude "tests/testdata" astroid
commands = black --check --exclude "tests/testdata" astroid tests
changedir = {toxinidir}

[testenv:coveralls]
Expand Down

0 comments on commit d0e5e8c

Please sign in to comment.