Write to same file from different modules
I have a test suite which is a collection of tests running from different modules. At different points in different tests I want to verify that something exists and write into a separate txt file that it does. But I can only get the first module called to write to the file, the second module does not. I guess one dirty solution is to have separate files for each module.
Another strange thing is that the following code runs one time, but when I run it a second time i get the error:
[error] script [ testsuite] stopped with error in line 2
[error] ValueError ( I/O operation on closed file )
Here is a condensed version of what i´ve done so far:
(Module: testsuite.sikuli)
Import Method1
Method1.tst1()
(Module:
import Method2
from sikuli import *
logfile = file("C:
def tst1():
logfile.
logfile.close
Method2.tst2()
(Module :Method2.sikuli)
from sikuli import *
logfile = file("C:
def tst2():
logfile.
logfile.close
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: