Re: [Tutor] redirecting testing output to file, using two different options

2018-05-17 Thread Peter Otten
Yosef Levy wrote: > Hello All, > > I have testing environment. > Code is written under Python 2.6. > testing output should be redirected to log file. > I am using two different file handling, in order to log output: > > > > 1. logging module: > > import unittest2 > import logging > import sys

Re: [Tutor] redirecting testing output to file, using two different options

2018-05-17 Thread Yosef Levy
As I understand from documentation reading, pytest does not support advanced file handling like logging module.. for example: log file rotate, limit file size etc. I am using OS Centos6 2018-05-16 21:48 GMT+03:00 Mats Wichmann : > On 05/16/2018 02:53 AM, Yosef Levy wrote: > > Hello All, > > > >

Re: [Tutor] redirecting testing output to file, using two different options

2018-05-16 Thread Mats Wichmann
On 05/16/2018 02:53 AM, Yosef Levy wrote: > Hello All, > > I have testing environment. > Code is written under Python 2.6. Why? 2.6 was retired in October 2013. For long life of your code you should be using Python 3, but at least 2.7 is still current and getting updates (for another 18 months o

Re: [Tutor] redirecting testing output to file, using two different options

2018-05-16 Thread Alan Gauld via Tutor
On 16/05/18 09:53, Yosef Levy wrote: > Hello All, > > I have testing environment. > Code is written under Python 2.6. > testing output should be redirected to log file. You don't say which OS you are using but if it's a Unix variant you could just use command line redirection of stdout/stderr. Th