Remove volumes from drone and fix test
This commit is contained in:
parent
8558eccf60
commit
927a00e7b5
|
@ -13,8 +13,6 @@ pipeline:
|
|||
commands:
|
||||
- pip install tox
|
||||
- tox -e "${TOXENV}-${DATABASE}"
|
||||
volumes:
|
||||
- cache:/root/.cache
|
||||
|
||||
services:
|
||||
postgresql:
|
||||
|
|
23
setup.py
23
setup.py
|
@ -14,7 +14,9 @@ except ImportError:
|
|||
|
||||
MODULE = 'sale_payment_type'
|
||||
PREFIX = 'trytonspain'
|
||||
MODULE2PREFIX = {}
|
||||
MODULE2PREFIX = {
|
||||
'account_payment_type': 'trytonspain',
|
||||
}
|
||||
|
||||
|
||||
def read(fname):
|
||||
|
@ -50,8 +52,22 @@ for dep in info.get('depends', []):
|
|||
requires.append(get_require_version('%s_%s' % (prefix, dep)))
|
||||
requires.append(get_require_version('trytond'))
|
||||
|
||||
tests_require = [get_require_version('proteus')]
|
||||
dependency_links = []
|
||||
tests_require = [get_require_version('proteus'),
|
||||
get_require_version('trytond_sale_invoice_grouping'),
|
||||
]
|
||||
series = '%s.%s' % (major_version, minor_version)
|
||||
if minor_version % 2:
|
||||
branch = 'default'
|
||||
else:
|
||||
branch = series
|
||||
dependency_links = [
|
||||
('hg+https://bitbucket.org/trytonspain/'
|
||||
'trytond-account_payment_type@%(branch)s'
|
||||
'#egg=trytonspain-account_payment_type-%(series)s' % {
|
||||
'branch': branch,
|
||||
'series': series,
|
||||
}),
|
||||
]
|
||||
if minor_version % 2:
|
||||
# Add development index for testing with proteus
|
||||
dependency_links.append('https://trydevpi.tryton.org/')
|
||||
|
@ -119,5 +135,6 @@ setup(name='%s_%s' % (PREFIX, MODULE),
|
|||
use_2to3=True,
|
||||
convert_2to3_doctests=[
|
||||
'tests/scenario_sale_payment_type.rst',
|
||||
'tests/scenario_sale_payment_type_grouping.rst',
|
||||
],
|
||||
)
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#This file is part of sale_payment_type module for Tryton.
|
||||
#The COPYRIGHT file at the top level of this repository contains
|
||||
#the full copyright notices and license terms.
|
||||
|
||||
from .test_sale_payment_type import suite
|
||||
# This file is part of sale_payment_type module for Tryton. The COPYRIGHT file
|
||||
# at the top level of this repository contains the full copyright notices and
|
||||
# license terms.
|
||||
try:
|
||||
from trytond.modules.sale_payment_type.tests.test_sale_payment_type import suite
|
||||
except ImportError:
|
||||
from .test_sale_payment_type import suite
|
||||
|
||||
__all__ = ['suite']
|
||||
|
|
|
@ -5,8 +5,7 @@ import unittest
|
|||
import doctest
|
||||
import trytond.tests.test_tryton
|
||||
from trytond.tests.test_tryton import ModuleTestCase
|
||||
from trytond.tests.test_tryton import (doctest_setup, doctest_teardown,
|
||||
doctest_checker)
|
||||
from trytond.tests.test_tryton import doctest_teardown, doctest_checker
|
||||
|
||||
|
||||
class SalePaymentTypeTestCase(ModuleTestCase):
|
||||
|
@ -19,11 +18,12 @@ def suite():
|
|||
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
|
||||
SalePaymentTypeTestCase))
|
||||
suite.addTests(doctest.DocFileSuite('scenario_sale_payment_type.rst',
|
||||
setUp=doctest_setup, tearDown=doctest_teardown, encoding='UTF-8',
|
||||
tearDown=doctest_teardown, encoding='UTF-8',
|
||||
optionflags=doctest.REPORT_ONLY_FIRST_FAILURE,
|
||||
checker=doctest_checker))
|
||||
suite.addTests(doctest.DocFileSuite('scenario_sale_payment_type_grouping.rst',
|
||||
setUp=doctest_setup, tearDown=doctest_teardown, encoding='UTF-8',
|
||||
suite.addTests(doctest.DocFileSuite(
|
||||
'scenario_sale_payment_type_grouping.rst',
|
||||
tearDown=doctest_teardown, encoding='UTF-8',
|
||||
optionflags=doctest.REPORT_ONLY_FIRST_FAILURE,
|
||||
checker=doctest_checker))
|
||||
return suite
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -15,4 +15,4 @@ setenv =
|
|||
sqlite: DB_NAME={env:SQLITE_NAME::memory:}
|
||||
postgresql: DB_NAME={env:POSTGRESQL_NAME:test}
|
||||
mysql: DB_NAME={env:MYSQL_NAME:test}
|
||||
install_command = pip install --pre --find-links https://trydevpi.tryton.org/ {opts} {packages}
|
||||
install_command = pip install --pre --process-dependency-links {opts} {packages}
|
||||
|
|
Loading…
Reference in a new issue