Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Trac: Tickets

[The Trac Project] #3858: mimeview unit test fails

 

 

Trac tickets RSS feed   Index | Next | Previous | View Threaded


noreply at edgewall

Oct 4, 2006, 9:49 AM

Post #1 of 2 (803 views)
Permalink
[The Trac Project] #3858: mimeview unit test fails

#3858: mimeview unit test fails
-------------------------------------+--------------------------------------
Reporter: david.vanmaren [at] dako | Owner: jonas
Type: defect | Status: new
Priority: low | Milestone:
Component: general | Version: 0.10
Severity: minor | Keywords: mimeview
-------------------------------------+--------------------------------------
This is likely related to #3332, but when I run the unit tests on 0.10, I
get a failed assertion.

From my uninformed perspective, it appears that the defect is in the test
code, rather than in the logic of get_mimetype().

I am running SLES10, x86_64, Python 2.4.2. Here's a snippet of {{{svn
info}}} from my working copy:
{{{
URL: http://svn.edgewall.com/repos/trac/tags/trac-0.10
Revision: 3804
}}}

Here's the test output:
{{{
#!sh
$ PYTHONPATH=. trac/test.py
SKIP: mimeview/tests/php.py
.................................................................F............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
======================================================================
FAIL: test_from_suffix_using_mimetypes
(trac.mimeview.tests.api.GetMimeTypeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/trac-svn/trac/mimeview/tests/api.py", line 26, in
test_from_suffix_using_mimetypes
get_mimetype('test.pyc', None))
AssertionError: 'application/x-python-code' != 'application/x-python-
bytecode'

----------------------------------------------------------------------
Ran 590 tests in 39.788s

FAILED (failures=1)
}}}

--
Ticket URL: <http://trac.edgewall.org/ticket/3858>
The Trac Project <http://trac.edgewall.org/>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Tickets" group.
To post to this group, send email to trac-tickets [at] googlegroups
To unsubscribe from this group, send email to trac-tickets-unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.se/group/trac-tickets
-~----------~----~----~----~------~----~------~--~---


noreply at edgewall

Oct 4, 2006, 10:00 AM

Post #2 of 2 (757 views)
Permalink
Re: [The Trac Project] #3858: mimeview unit test fails [In reply to]

#3858: mimeview unit test fails
-------------------------------------+--------------------------------------
Reporter: david.vanmaren [at] dako | Owner: cboos
Type: defect | Status: new
Priority: low | Milestone: 0.10.1
Component: general | Version: 0.10
Severity: minor | Resolution:
Keywords: mimeview |
-------------------------------------+--------------------------------------
Changes (by cboos):

* owner: jonas => cboos
* milestone: => 0.10.1

Comment:

Well, I guess it's a problem with Python's `mimetypes` module.

Mine gives:
{{{
$ python
ActivePython 2.4.2 Build 248 (ActiveState Corp.) based on
Python 2.4.2 (#67, Oct 30 2005, 16:11:18) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import mimetypes
>>> mimetypes.init()
>>> mimetypes.types_map['.pyc']
'application/x-python-code'
>>>
}}}

I guess we should pick a test case less susceptible to differ from
platform to platform or version to version...

--
Ticket URL: <http://trac.edgewall.org/ticket/3858#comment:1>
The Trac Project <http://trac.edgewall.org/>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Tickets" group.
To post to this group, send email to trac-tickets [at] googlegroups
To unsubscribe from this group, send email to trac-tickets-unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.se/group/trac-tickets
-~----------~----~----~----~------~----~------~--~---

Trac tickets RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.