Hello,
Is there an easy of running .rst scenario files in python that we can see in the source code:
Currently, I am copying this .rst file , renaming to .py file, commenting out non-commands and deleting >>> markers to convert to a normal python file. Can this file be run directly in python instead?
For example I do the following :
#================
#Invoice Scenario
#================
#Imports::
import datetime
from dateutil.relativedelta import relativedelta
from the original Few line of code from the top:
================
Invoice Scenario
================
Imports::
>>> import datetime
>>> from dateutil.relativedelta import relativedelta
>>> from decimal import Decimal
>>> from operator import attrgetter
>>> from proteus import Model, Wizard
>>> from trytond.tests.tools import activate_modules
>>> from trytond.modules.company.tests.tools import create_company, \
... get_company
>>> from trytond.modules.account.tests.tools import create_fiscalyear, \
... create_chart, get_accounts, create_tax, set_tax_code
>>> from trytond.modules.account_invoice.tests.tools import \
... set_fiscalyear_invoice_sequences
>>> today = datetime.date.today()
Install account_invoice::
>>> config = activate_modules('account_invoice')