davesteele / gnome-gmail

Integrate GMail into the Linux Desktop
https://davesteele.github.io/gnome-gmail/
GNU General Public License v2.0
50 stars 13 forks source link

/etc/resolv.conf used in tests might not exist #57

Closed scop closed 6 years ago

scop commented 7 years ago

/etc/resolv.conf which is used in test_main for attachment testing might not exist when tests are being run within a container or a chroot. Would be better to use some that are known to be present, e.g. gnome-gmail's own in-tree README.md.

scop commented 7 years ago

Also, there doesn't seem to be any useful output from the tests when the attachment file doesn't exist. The tests just take a long time and fail with other, generic tracebacks.

$ sed -i -e "s|/etc/resolv.conf|/doesnt/exist|" test/test_main.py
$ python setup.py test
# takes a long time, then outputs a bunch of raw failure tracebacks like:
test/test_main.py:74: IndexError
[...]
>           rfc822txt = gnomegmail.GMailAPI.form_message.msgtxt[0]
E           IndexError: list index out of range
davesteele commented 6 years ago

Adressed in 52a358aea4c9686ebac24c9f91bc2ee58e3757c6, slated for v2.5.