1
0
Fork 0
mirror of synced 2023-12-13 21:20:09 +01:00

Remove volumes from drone and fix test

This commit is contained in:
C?dric Krier 2018-01-23 13:26:52 +01:00
parent 8558eccf60
commit 927a00e7b5
5 changed files with 33 additions and 16 deletions

View file

@ -13,8 +13,6 @@ pipeline:
commands:
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
services:
postgresql:

View file

@ -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',
],
)

View file

@ -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']

View file

@ -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

View file

@ -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}