Discussion:
Test window creation
(too old to reply)
Luis Mochan
2016-07-26 13:21:00 UTC
Permalink
I wonder how do you 'Test' a module that is related to a graphical
interface. I got failure reports from cpan testers with messages like:

# got: 'couldn't connect to display ":0" at \
/home/cpan/pit/thr/conf/perl-5.24.0/.cpanplus/5.24.0/build/Ss0ihFoAc_/Tk-804.033/blib/lib/Tk/MainWindow.pm \
line 53.
# Tk::MainWindow->new() at t/create.t line 45.

I guess that my testing code should have realized that there was no
available display, skipped the test and issued a warning instead of
failing, but I don't know how to do that. Any suggestion?

Best regards,
Luis
--
o
W. Luis Mochán, | tel:(52)(777)329-1734 /<(*)
Instituto de Ciencias Físicas, UNAM | fax:(52)(777)317-5388 `>/ /\
Apdo. Postal 48-3, 62251 | (*)/\/ \
Cuernavaca, Morelos, México | ***@fis.unam.mx /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16 C2DF 5F0A C52B 791E B9EB
David Cantrell
2016-07-26 15:28:17 UTC
Permalink
Post by Luis Mochan
I wonder how do you 'Test' a module that is related to a graphical
# got: 'couldn't connect to display ":0" at \
/home/cpan/pit/thr/conf/perl-5.24.0/.cpanplus/5.24.0/build/Ss0ihFoAc_/Tk-804.033/blib/lib/Tk/MainWindow.pm \
line 53.
# Tk::MainWindow->new() at t/create.t line 45.
See the section "Why are you testing (and failing) my Tk-ish module
without an X server" here:
http://wiki.cpantesters.org/wiki/CPANAuthorNotes
--
David Cantrell | Reality Engineer, Ministry of Information

More people are driven insane through religious hysteria than
by drinking alcohol. -- W C Fields
Loading...