Make tox work with python 3.11
All checks were successful
buildbot/django-dav-events--test Build done.
All checks were successful
buildbot/django-dav-events--test Build done.
This commit is contained in:
@@ -1,6 +1,3 @@
|
|||||||
# common dist files
|
|
||||||
include README.rst INSTALL.rst
|
|
||||||
include setup.py requirements.txt
|
|
||||||
# dav_base
|
# dav_base
|
||||||
recursive-include dav_base/console_scripts/django_project_config *.py
|
recursive-include dav_base/console_scripts/django_project_config *.py
|
||||||
recursive-include dav_base/static *
|
recursive-include dav_base/static *
|
||||||
|
|||||||
@@ -4,10 +4,7 @@ import os
|
|||||||
from tempfile import mkdtemp as _mkdtemp
|
from tempfile import mkdtemp as _mkdtemp
|
||||||
|
|
||||||
|
|
||||||
def mkdtemp(prefix):
|
def mkdtemp(prefix, base_dir):
|
||||||
dirname = os.path.dirname
|
if not os.path.exists(base_dir):
|
||||||
pkg_base_dir = dirname(dirname(dirname(__file__)))
|
os.makedirs(base_dir)
|
||||||
tmp_dir = os.path.join(pkg_base_dir, 'tmp')
|
return _mkdtemp(prefix=prefix, dir=base_dir)
|
||||||
if not os.path.exists(tmp_dir):
|
|
||||||
os.makedirs(tmp_dir)
|
|
||||||
return _mkdtemp(prefix=prefix, dir=tmp_dir)
|
|
||||||
|
|||||||
4
setup.py
4
setup.py
@@ -92,9 +92,9 @@ class QuickSetup(MyCommand):
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='django-dav-events',
|
name='django-dav-events',
|
||||||
version='2.1',
|
version='2.1.2',
|
||||||
description='A django based web application project to organize DAV Events.',
|
description='A django based web application project to organize DAV Events.',
|
||||||
url='https://touren.alpenverein-karlsruhe.de',
|
url='https://dev.heinzelwerk.de/git/DAV-KA/django-dav-events',
|
||||||
author='Jens Kleineheismann',
|
author='Jens Kleineheismann',
|
||||||
author_email='heinzel@alpenverein-karlsruhe.de',
|
author_email='heinzel@alpenverein-karlsruhe.de',
|
||||||
cmdclass={
|
cmdclass={
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ from dav_base.tests.utils import mkdtemp
|
|||||||
|
|
||||||
# from dav_base.console_scripts.admin import DJANGO_MAIN_MODULE
|
# from dav_base.console_scripts.admin import DJANGO_MAIN_MODULE
|
||||||
DJANGO_MAIN_MODULE = 'main'
|
DJANGO_MAIN_MODULE = 'main'
|
||||||
|
TMP_BASE_DIR = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'tmp')
|
||||||
|
|
||||||
|
|
||||||
class DjangoEnvironment:
|
class DjangoEnvironment:
|
||||||
@@ -42,7 +43,7 @@ class DjangoEnvironment:
|
|||||||
prefix = 'testrun-{datetime}-'.format(
|
prefix = 'testrun-{datetime}-'.format(
|
||||||
datetime=datetime.datetime.now().strftime('%Y%m%d-%H%M')
|
datetime=datetime.datetime.now().strftime('%Y%m%d-%H%M')
|
||||||
)
|
)
|
||||||
self.path = mkdtemp(prefix=prefix)
|
self.path = mkdtemp(prefix=prefix, base_dir=TMP_BASE_DIR)
|
||||||
|
|
||||||
self._install_djangoproject(self.path, modules=self._enable_modules)
|
self._install_djangoproject(self.path, modules=self._enable_modules)
|
||||||
|
|
||||||
|
|||||||
7
tox.ini
7
tox.ini
@@ -1,7 +1,10 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = py3
|
envlist = py311
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
recreate = false
|
||||||
|
setenv =
|
||||||
|
PYTHONPATH = .
|
||||||
commands = python --version
|
commands = python --version
|
||||||
python -m coverage run tests/test_suite.py
|
python -m coverage run tests
|
||||||
coverage report --skip-covered
|
coverage report --skip-covered
|
||||||
|
|||||||
Reference in New Issue
Block a user