Closed kutsurak closed 4 years ago
Why do the tests fail? Since these changes connect to a host not running monetdb first? Shouldn't this be info logging if this is not a warning?
How are the tests ran? You can configure your logging behaviour independent of what i log on the client side:
import logging
logging.basicConfig(level=logging.ERROR)
Hi Gijs,
The MonetDB test suite typically work as follows (this is a simplified description):
For each test
Some of the tests (about 160) are written in Python, and use pymonetdb to connect to the server and run the SQL. You understand that any extra output from pymonetdb itself will make those test fail.
There at least three ways to deal with this that I know of:
#
). The algorithm that compares the output of the test with the known good output ignores lines starting with #
.NullHandler
for pymonetdb as suggested by the official documentation.I believe that the last solution is the correct one. This will allow the developers of pymonetdb to use any logging facilities they need, and the application developers to choose if they want to see logging output from the library. In the case of the test suite, where we do not want any extra output, so we do not configure any handlers and logging messages do not appear anywhere.
Thoughts?
I think just changing the loglevel to info for this warning should solve the issue, since I think it is an actual info level log message and the default loger only logs warning or higher.
Ok going to change this to info
on master, thanks for reporting the issue.
Thanks! Sorry for being silent, but offline life has been a bit hectic the past few days. I will try to finalize two other PRs (the one for blobs and one for the profiler), that I have been working on, today.
ok, i was working on the UDF stuff now also, lets move discussion about that to this issue: https://github.com/gijzelaerr/pymonetdb/issues/49
Printing on stderr (or stdin) causes every test written in python in the MonetDB test suite to fail.