On 2017-05-27 12:16, Karla Stenger wrote:
> 2017-05-27 6:10 GMT-03:00 Dr. Praveen Bhatia <[email protected]>:
> 
> > Hello,
> >    Is there an easy of running .rst scenario files in python that we can
> > see in the source code:
> >    For ex: https://hg.tryton.org/modules/account_invoice/file/tip/
> > tests/scenario_invoice.rst#l37
> >
> 
> ​Hi,
> Yes.
> These files are part of the test suite of tryton, so to run them you need
> to run the test suite.

Indeed it should be possible to run them outside the test suite by
using:

    $ python -m doctest 
trytond/modules/account_invoice/tests/scenario_invoice.rst

But you have to define at least a database name with the environment
variable `DB_NAME` or `TRYTOND_DATABASE_URI`. You can also use the
`TRYTOND_CONFIG`.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: [email protected]
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/20170528062635.GB15881%40kei.

Reply via email to