Replace test setuptools command by unittest discover
issue9215 review389851002
This commit is contained in:
1 parent
ad10a5f058
commit
73ea3adbd3
4 files changed
+2
-17
No files matched your search
@@ -142,6 +142,4 @@ setup(name=name,
|
||||
[trytond.modules]
|
||||
google_maps = trytond.modules.google_maps
|
||||
""",
|
||||
test_suite='tests',
|
||||
test_loader='trytond.test_loader:Loader',
|
||||
)
|
||||
@@ -1,9 +1,2 @@
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
|
||||
try:
|
||||
from trytond.modules.google_maps.tests.test_google_maps import suite
|
||||
except ImportError:
|
||||
from .test_google_maps import suite
|
||||
|
||||
__all__ = ['suite']
|
||||
@@ -1,9 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
import unittest
|
||||
|
||||
import trytond.tests.test_tryton
|
||||
from trytond.pool import Pool
|
||||
from trytond.tests.test_tryton import ModuleTestCase, with_transaction
|
||||
|
||||
@@ -45,8 +43,4 @@ class GoogleMapsTestCase(ModuleTestCase):
|
||||
'q=D%C3%A9p%C3%B4t%20Street%2018503%20Scranton')
|
||||
|
||||
|
||||
def suite():
|
||||
suite = trytond.tests.test_tryton.suite()
|
||||
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
|
||||
GoogleMapsTestCase))
|
||||
return suite
|
||||
del ModuleTestCase
|
||||
@@ -3,7 +3,7 @@ envlist = {py37,py38,py39,py310}-{sqlite,postgresql}
|
||||
|
||||
[testenv]
|
||||
commands =
|
||||
coverage run --include=.*/google_maps/* setup.py test
|
||||
coverage run --include=.*/google_maps/* -m unittest discover -s tests
|
||||
coverage report --include=.*/google_maps/* --omit=*/tests/*
|
||||
deps =
|
||||
coverage
|
||||
|
||||
Reference in new issue
Block a user