#631: WebSearch: fix failure of unit test "searching by last week"
-----------------------+------------------
 Reporter:  simko      |      Owner:
     Type:  defect     |     Status:  new
 Priority:  critical   |  Milestone:  v1.0
Component:  WebSearch  |    Version:
 Keywords:             |
-----------------------+------------------
 The unit test "searching by last week" fails today, see the traceback:

 {{{
 ======================================================================
 FAIL: SPIRES search syntax - searching by last week
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/local/lib/python2.6/dist-
 packages/invenio/search_engine_query_parser_tests.py", line 688, in
 test_date_accept_last_week
     self._compare_searches(inv_search, spi_search)
   File "/usr/local/lib/python2.6/dist-
 packages/invenio/search_engine_query_parser_tests.py", line 345, in
 _compare_searches
     (repr(result_obtained), repr(result_wanted))
 AssertionError: SPIRES parsed as [['+', '2011-05', 'year', 'w']] instead
 of [['+', '2011-05-01', 'year', 'w']]
 }}}

 The test case probably fails today (March 13th 2011) because the
 beginning of the last week falls exactly on the first day of the month
 of March, and the first day of the month is currently specially
 (mis)interpreted as the full month, see ticket:431.

 We should fix the problem by interpreting YYYY-MM-01 as the first day
 only, not as the full month.

-- 
Ticket URL: <http://invenio-software.org/ticket/631>
Invenio <http://invenio-software.org>

Reply via email to