Skip to content

Adjust where tests are located #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

[run]
source=pylint_django

[report]
omit=pylint_django/tests/*
5 changes: 3 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include *.md
include LICENSE
include pylint_django/transforms/transforms/*
include test/input/*.txt test/input/*.rc
include pylint_django/transforms/transforms/*.py
recursive-include pylint_django/tests/ *.py *.rc *.txt
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions test/test_func.py → pylint_django/tests/test_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
sys.path.append(os.path.join(os.path.dirname(pylint.__file__), 'test'))
import test_functional

# alter sys.path again because the tests now live as a subdirectory
# of pylint_django
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..'))
from pylint_django.compat import django_version


Expand Down
2 changes: 1 addition & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
PYTHONPATH=. python test/test_func.py
python pylint_django/tests/test_func.py
56 changes: 17 additions & 39 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,52 +5,30 @@
import os
from setuptools import setup, find_packages

VERSION = '0.9.1'
PACKAGES = find_packages(exclude=[
'*.tests',
'*.tests.*',
'tests.*',
'tests',
])

SHORT_DESCRIPTION = 'A Pylint plugin to help Pylint understand the Django web framework'

TRANSFORM_DIR = 'pylint_django/transforms/transforms'
PACKAGE_DATA = {
'pylint_django': [
os.path.join('transforms/transforms', name) for name in os.listdir(TRANSFORM_DIR)
]
}

CLASSIFIERS = (
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Operating System :: Unix',
'Topic :: Software Development :: Quality Assurance',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
)

INSTALL_REQUIRES = [
'pylint-plugin-utils>=0.2.1',
'pylint>=1.8.2',
]


setup(
name='pylint-django',
url='https://github.com/PyCQA/pylint-django',
author='landscape.io',
author_email='code@landscape.io',
description=SHORT_DESCRIPTION,
version=VERSION,
packages=PACKAGES,
package_data=PACKAGE_DATA,
install_requires=INSTALL_REQUIRES,
description='A Pylint plugin to help Pylint understand the Django web framework',
version='0.9.2',
packages=find_packages(),
install_requires=[
'pylint-plugin-utils>=0.2.1',
'pylint>=1.8.2',
],
license='GPLv2',
classifiers=CLASSIFIERS,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Operating System :: Unix',
'Topic :: Software Development :: Quality Assurance',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
keywords=['pylint', 'django', 'plugin'],
zip_safe=False,
)
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ commands =
flake8: flake8
pylint: pylint --rcfile=tox.ini pylint_django setup
readme: python setup.py check --restructuredtext --strict
py{27,34,35,36}-django{111,20}: coverage run test/test_func.py
py{27,34,35,36}-django{111,20}: coverage run pylint_django/tests/test_func.py
clean: find . -type f -name '*.pyc' -delete
clean: find . -type d -name __pycache__ -delete
clean: rm -rf build/ .cache/ dist/ .eggs/ pylint_django.egg-info/ .tox/
Expand Down