test_nasties() fails with built-in datetime module

Bug #1369460 reported by James Page
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.serialization
Fix Released
Low
James Page
python-oslo.serialization (Ubuntu)
Fix Released
Undecided
James Page

Bug Description

Ubuntu 14.10 builds the datetime module directly into python; so the "from" clause in the nasties test fails depending on target distribution:

======================================================================
FAIL: tests.test_jsonutils.ToPrimitiveTestCase.test_nasties
tags: worker-0
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jamespage/src/upstream/oslo.serialization/tests/test_jsonutils.py", line 224, in test_nasties
    self.assertTrue(ret[0].startswith(u"<module 'datetime' from "))
  File "/usr/lib/python2.7/unittest/case.py", line 422, in assertTrue
    raise self.failureException(msg)
AssertionError: False is not true
Traceback (most recent call last):
_StringException: Empty attachments:
  stderr
  stdout

Traceback (most recent call last):
  File "/home/jamespage/src/upstream/oslo.serialization/tests/test_jsonutils.py", line 224, in test_nasties
    self.assertTrue(ret[0].startswith(u"<module 'datetime' from "))
  File "/usr/lib/python2.7/unittest/case.py", line 422, in assertTrue
    raise self.failureException(msg)
AssertionError: False is not true

Traceback (most recent call last):
_StringException: Empty attachments:
  stderr
  stdout

Traceback (most recent call last):
  File "/home/jamespage/src/upstream/oslo.serialization/tests/test_jsonutils.py", line 224, in test_nasties
    self.assertTrue(ret[0].startswith(u"<module 'datetime' from "))
  File "/usr/lib/python2.7/unittest/case.py", line 422, in assertTrue
    raise self.failureException(msg)
AssertionError: False is not true

James Page (james-page)
Changed in oslo.serialization:
assignee: nobody → James Page (james-page)
James Page (james-page)
Changed in python-oslo.serialization (Ubuntu):
assignee: nobody → James Page (james-page)
description: updated
Changed in oslo.serialization:
milestone: none → next-kilo
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-oslo.serialization - 0.1.0-1ubuntu1

---------------
python-oslo.serialization (0.1.0-1ubuntu1) utopic; urgency=medium

  * d/p/datetime-builtin.patch: Ensure tests understand the concept of
    a built-in datetime module, fixing FTBFS (LP: #1369460).
 -- James Page <email address hidden> Mon, 15 Sep 2014 10:14:49 +0100

Changed in python-oslo.serialization (Ubuntu):
status: New → Fix Released
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

James, anything we need to do in oslo.serialization?

Changed in oslo.serialization:
status: Triaged → Incomplete
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :
Changed in oslo.serialization:
status: Incomplete → Fix Committed
Ben Nemec (bnemec)
Changed in oslo.serialization:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.