diff options
author | Ashley Whetter <ashley@awhetter.co.uk> | 2018-05-14 15:04:16 -0700 |
---|---|---|
committer | Ashley Whetter <AWhetter@users.noreply.github.com> | 2018-05-17 06:43:54 -0700 |
commit | f4196707cbd1d2b63bb4c24bc8376275676c615f (patch) | |
tree | 54880d6a82a08c2223781d4a2d217b6eda8d47dd | |
parent | cd76b495d5e590138a90300d60cfcc5b4647cea5 (diff) | |
download | astroid-git-f4196707cbd1d2b63bb4c24bc8376275676c615f.tar.gz |
Tests are no longer installed
-rw-r--r-- | MANIFEST.in | 6 | ||||
-rw-r--r-- | pytest.ini | 3 | ||||
-rw-r--r-- | setup.cfg | 5 | ||||
-rw-r--r-- | setup.py | 24 |
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" @@ -1,5 +1,8 @@ [wheel] universal = 1 + +[aliases] +test = pytest + [tool:pytest] -python_files = unittest_* test_*.py testpaths = astroid/tests @@ -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'], ) |