summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshley Whetter <ashley@awhetter.co.uk>2018-05-14 15:04:16 -0700
committerAshley Whetter <AWhetter@users.noreply.github.com>2018-05-17 06:43:54 -0700
commitf4196707cbd1d2b63bb4c24bc8376275676c615f (patch)
tree54880d6a82a08c2223781d4a2d217b6eda8d47dd
parentcd76b495d5e590138a90300d60cfcc5b4647cea5 (diff)
downloadastroid-git-f4196707cbd1d2b63bb4c24bc8376275676c615f.tar.gz
Tests are no longer installed
-rw-r--r--MANIFEST.in6
-rw-r--r--pytest.ini3
-rw-r--r--setup.cfg5
-rw-r--r--setup.py24
4 files changed, 14 insertions, 24 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
index 4837adf1..5016f647 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,7 +1,7 @@
include ChangeLog
-include README
+include README.rst
include COPYING
include COPYING.LESSER
-include tox.ini
-recursive-include astroid/tests/testdata *.py *.zip *.egg
+include pytest.ini
+recursive-include astroid/tests *.py *.zip *.egg *.pth
recursive-include astroid/brain *.py
diff --git a/pytest.ini b/pytest.ini
new file mode 100644
index 00000000..f3820827
--- /dev/null
+++ b/pytest.ini
@@ -0,0 +1,3 @@
+[pytest]
+python_files=*test_*.py
+addopts=-m "not acceptance"
diff --git a/setup.cfg b/setup.cfg
index f8e89c28..8f25358d 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,8 @@
[wheel]
universal = 1
+
+[aliases]
+test = pytest
+
[tool:pytest]
-python_files = unittest_* test_*.py
testpaths = astroid/tests
diff --git a/setup.py b/setup.py
index 4854cf93..66bff99c 100644
--- a/setup.py
+++ b/setup.py
@@ -24,22 +24,6 @@ with open(pkginfo, 'rb') as fobj:
with open(os.path.join(astroid_dir, 'README.rst')) as fobj:
long_description = fobj.read()
-class AstroidInstallLib(install_lib.install_lib):
- def byte_compile(self, files):
- test_datadir = os.path.join('astroid', 'tests', 'testdata')
- files = [f for f in files if test_datadir not in f]
- install_lib.install_lib.byte_compile(self, files)
-
-
-class AstroidEasyInstallLib(easy_install.easy_install):
- # override this since pip/easy_install attempt to byte compile
- # test data files, some of them being syntactically wrong by design,
- # and this scares the end-user
- def byte_compile(self, files):
- test_datadir = os.path.join('astroid', 'tests', 'testdata')
- files = [f for f in files if test_datadir not in f]
- easy_install.easy_install.byte_compile(self, files)
-
def install():
return setup(name = distname,
@@ -51,13 +35,13 @@ def install():
author = author,
author_email = author_email,
url = web,
- include_package_data = True,
python_requires='>=3.4.*',
install_requires = install_requires,
extras_require=extras_require,
- packages = find_packages(),
- cmdclass={'install_lib': AstroidInstallLib,
- 'easy_install': AstroidEasyInstallLib}
+ packages=find_packages(exclude=['astroid.tests']) + ['astroid.brain'],
+ setup_requires=['pytest-runner'],
+ test_suite='test',
+ tests_require=['pytest'],
)