Replace test setuptools command by unittest discover
This commit is contained in:
parent
60d0f41605
commit
ddf86a8d45
|
@ -1,6 +0,0 @@
|
||||||
# This file is part account_invoice_rule module for Tryton.
|
|
||||||
# The COPYRIGHT file at the top level of this repository contains
|
|
||||||
# the full copyright notices and license terms.
|
|
||||||
from .test_account_invoice_rule import suite
|
|
||||||
|
|
||||||
__all__ = ['suite']
|
|
|
@ -1,26 +0,0 @@
|
||||||
# This file is part account_invoice_rule module for Tryton.
|
|
||||||
# The COPYRIGHT file at the top level of this repository contains
|
|
||||||
# the full copyright notices and license terms.
|
|
||||||
import unittest
|
|
||||||
import doctest
|
|
||||||
|
|
||||||
from trytond.tests.test_tryton import ModuleTestCase
|
|
||||||
from trytond.tests.test_tryton import suite as test_suite
|
|
||||||
from trytond.tests.test_tryton import doctest_teardown
|
|
||||||
from trytond.tests.test_tryton import doctest_checker
|
|
||||||
|
|
||||||
|
|
||||||
class AccountInvoiceRuleTestCase(ModuleTestCase):
|
|
||||||
'Test Account Invoice Rule module'
|
|
||||||
module = 'account_invoice_rule'
|
|
||||||
|
|
||||||
|
|
||||||
def suite():
|
|
||||||
suite = test_suite()
|
|
||||||
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
|
|
||||||
AccountInvoiceRuleTestCase))
|
|
||||||
suite.addTests(doctest.DocFileSuite('scenario_invoice.rst',
|
|
||||||
tearDown=doctest_teardown, encoding='utf-8',
|
|
||||||
checker=doctest_checker,
|
|
||||||
optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
|
|
||||||
return suite
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
|
||||||
|
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
|
# this repository contains the full copyright notices and license terms.
|
||||||
|
|
||||||
|
from trytond.modules.company.tests import CompanyTestMixin
|
||||||
|
from trytond.tests.test_tryton import ModuleTestCase
|
||||||
|
|
||||||
|
|
||||||
|
class AccountInvoiceRuleTestCase(CompanyTestMixin, ModuleTestCase):
|
||||||
|
'Test AccountInvoiceRule module'
|
||||||
|
module = 'account_invoice_rule'
|
||||||
|
|
||||||
|
|
||||||
|
del ModuleTestCase
|
|
@ -0,0 +1,23 @@
|
||||||
|
|
||||||
|
# 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 doctest
|
||||||
|
import glob
|
||||||
|
import os
|
||||||
|
|
||||||
|
from trytond.tests.test_tryton import doctest_checker, doctest_teardown
|
||||||
|
|
||||||
|
|
||||||
|
def load_tests(loader, tests, pattern):
|
||||||
|
cwd = os.getcwd()
|
||||||
|
try:
|
||||||
|
os.chdir(os.path.dirname(__file__))
|
||||||
|
for scenario in glob.glob('*.rst'):
|
||||||
|
tests.addTests(doctest.DocFileSuite(
|
||||||
|
scenario, tearDown=doctest_teardown, encoding='utf-8',
|
||||||
|
checker=doctest_checker,
|
||||||
|
optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
|
||||||
|
finally:
|
||||||
|
os.chdir(cwd)
|
||||||
|
return tests
|
Loading…
Reference in New Issue