diff .travis.yml @ 6480:0f0cee081990

Force test of a locale We had a file descriptor leak in the i18n routines. The code that opens a .mo file and then closes it was not tested. Add a test for converting dates to german locale. Make test use the locale/locale subdirectory tree. To do this build the .mo files and put them into the proper tree structure: locale/locale/<two char lang code>/LC_MESSAGES/roundup.mo Also make py.test run with warnings made into errors. Try to get advanced warnings of deprecation issues, resource leaks etc. Ignore error generated by the markdown module that uses the old SelectableGroups interface to dict: DeprecationWarning: SelectableGroups dict interface is deprecated. Use select. Also ignore use of imp module in gpg.gpgme, U mode in docutils.io. Tried to split lines for the py.test run so each warning is on it's own line. Makes it more readable and editing in the future easier. Not sure if it's valid though. May need to revise.
author John Rouillard <rouilj@ieee.org>
date Mon, 06 Sep 2021 13:18:53 -0400
parents 8f1b91756457
children 59b128beb016
line wrap: on
line diff
--- a/.travis.yml	Sun Sep 05 23:38:10 2021 -0400
+++ b/.travis.yml	Mon Sep 06 13:18:53 2021 -0400
@@ -137,10 +137,20 @@
   #   needed for test_mysql.mysqlDBTest.testFilteringSpecialChars
   - sed -i 's/CREATE DATABASE \%s/CREATE DATABASE \%s COLLATE utf8_general_ci/' roundup/backends/back_mysql.py
 
+  # build the .mo translation files and install them into a tree
+  # (locale/locale under roundup directory root) 
+  # suitable for use by gettext.
+  - (cd locale; make local_install; ls -lR locale)
+
 script:
   - PATH=$VIRTUAL_ENV/bin:$PATH
   - export LD_LIBRARY_PATH=$VIRTUAL_ENV/lib:$LD_LIBRARY_PATH
-  - py.test -v --maxfail=20 test/ --cov=roundup
+  - py.test \
+    -W error \
+    -W "ignore::SelectableGroups" \
+    -W "ignore:the imp module:DeprecationWarning:gpg.gpgme:15" \
+    -W "ignore:'U' mode::docutils.io" \
+    -v --maxfail=20 test/ --cov=roundup
   
 
 after_success:

Roundup Issue Tracker: http://roundup-tracker.org/