Skip to content

Commit

Permalink
pytest&pyproject.toml対応をやめて、setup.pyで実行するように戻し
Browse files Browse the repository at this point in the history
  • Loading branch information
kashewnuts committed Feb 5, 2024
1 parent 8645f64 commit d2087e9
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 114 deletions.
4 changes: 4 additions & 0 deletions beproud/django/notify/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from beproud.django.notify.tests.test_basic import * #NOQA
from beproud.django.notify.tests.test_mail import * #NOQA
from beproud.django.notify.tests.test_storage import * #NOQA
from beproud.django.notify.tests.test_tasks import * #NOQA
62 changes: 0 additions & 62 deletions beproud/django/notify/tests/settings.py

This file was deleted.

37 changes: 0 additions & 37 deletions pyproject.toml

This file was deleted.

15 changes: 8 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ def read_file(filename):

setup(
name='bpnotify',
version='0.48',
version='0.49',
description='Notification routing for Django',
author='BeProud',
author_email='[email protected]',
long_description=read_file('README.rst'),
long_description_content_type="text/x-rst",
url='https://github.com/beproud/bpnotify/',
python_requires='>=3.6',
python_requires='>=3.9',
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Plugins',
Expand All @@ -30,21 +30,22 @@ def read_file(filename):
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Framework :: Django',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.2',
'Topic :: Software Development :: Libraries :: Python Modules',
],
include_package_data=True,
packages=find_packages(),
namespace_packages=['beproud', 'beproud.django'],
test_suite='tests.main',
install_requires=[
'Django>=2.2',
'django-jsonfield>=1.0.1',
'Celery>=4.2',
'Django>=3.2',
'Celery>=5.2',
'six',
],
zip_safe=False,
Expand Down
5 changes: 3 additions & 2 deletions test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# https://github.com/django/django/blob/70035fb0444ae7c01613374212ca5e3c27c9782c/django/conf/__init__.py#L188
# そのため、testではdjango.conf.global_settingsを直接利用せず、このtest用settings定数を使用する。

import os

SECRET_KEY = "SECRET"
INSTALLED_APPS = (
'django.contrib.auth',
Expand All @@ -24,6 +22,8 @@
}
}

import os

BASE_PATH = os.path.dirname(__file__)

TEMPLATES = [
Expand Down Expand Up @@ -58,3 +58,4 @@

# The name of the class to use to run the test suite
TEST_RUNNER = 'django.test.runner.DiscoverRunner'

6 changes: 0 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
envlist = py{39,310,311}-dj{32,42}-celery{52,53},py312-dj42-celery53
skipsdist = True

[pytest]
python_files = tests test_*.py *_tests.py
django_find_project = false
DJANGO_SETTINGS_MODULE = beproud.django.notify.tests.settings

[testenv]
basepython =
py39: python3.9
Expand All @@ -24,7 +19,6 @@ deps =
dj42: Django>=4.2,<5.0
celery52: celery>=5.2,<5.3
celery53: celery>=5.3,<5.4
# commands=pytest {posargs}
commands=python setup.py test

# tox-gh-actionsパッケージの設定
Expand Down

0 comments on commit d2087e9

Please sign in to comment.