test_share_links_search has unix-specific paths

Bug #1046466 reported by Mike McCracken
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu One Control Panel
New
Undecided
Roberto Alsina

Bug Description

test_filter and test_process_volumes_info fails on windows because the expected value in the code has unix paths, and the code will generate windows paths.

We need to fix the test, and verify that the code is doing the right thing - ie, is it OK to return strings with ~ on windows here?

[FAIL]
Traceback (most recent call last):
  File "C:\Users\mmccrack\Canonical\improve-buildout\scripts\devsetup\parts\ubuntuone-control-panel\ubuntuone\controlpanel\gui\qt\tests\test_share_links_search.py", line 182, in test_filter
    self.assertEqual(expected, self.ui.temp_u1_files)
  File "c:\users\mmccrack\canonical\improve-buildout\scripts\devsetup\eggs\twisted-11.1.0-py2.7-win32.egg\twisted\trial\unittest.py", line 270, in assertEqual
    % (msg, pformat(first), pformat(second)))
twisted.trial.unittest.FailTest: not equal:
a = ['~/blabla/iop']
b = ['~\\blabla\\iop']

===============================================================================
[FAIL]
Traceback (most recent call last):
  File "C:\Users\mmccrack\Canonical\improve-buildout\scripts\devsetup\parts\ubuntuone-control-panel\ubuntuone\controlpanel\gui\qt\tests\test_share_links_search.py", line 167, in test_process_volumes_info
    self.assertEqual(self.ui._thread_explore.u1_files, expected)
  File "c:\users\mmccrack\canonical\improve-buildout\scripts\devsetup\eggs\twisted-11.1.0-py2.7-win32.egg\twisted\trial\unittest.py", line 270, in assertEqual
    % (msg, pformat(first), pformat(second)))
twisted.trial.unittest.FailTest: not equal:
a = ['other_path\\test\\qwe',
 '~\\blabla\\iop',
 '~\\one\\file3',
 '~\\test\\asd',
 '~\\ubuntu\\file1',
 '~\\ubuntu\\file2']
b = ['other_path/test/qwe',
 '~/blabla/iop',
 '~/one/file3',
 '~/test/asd',
 '~/ubuntu/file1',
 '~/ubuntu/file2']

Tags: desktop+
Mike McCracken (mikemc)
description: updated
Revision history for this message
Mike McCracken (mikemc) wrote :

here's another one:

ubuntuone.controlpanel.gui.qt.tests.test_share_links_search.SearchBoxTestCase.test_process_volumes_info
===============================================================================
[FAIL]
Traceback (most recent call last):
  File "C:\Users\mmccrack\Canonical\improve-buildout\scripts\devsetup\parts\ubuntuone-control-panel\ubuntuone\controlpanel\gui\qt\tests\test_share_links_search.py", line 202, in test_set_selected_item
    self.assertEqual(self._called, ((u'other_path/test/qwe',), {}))
  File "c:\users\mmccrack\canonical\improve-buildout\scripts\devsetup\eggs\twisted-11.1.0-py2.7-win32.egg\twisted\trial\unittest.py", line 270, in assertEqual
    % (msg, pformat(first), pformat(second)))
twisted.trial.unittest.FailTest: not equal:
a = ((PyQt4.QtCore.QString(u'other_path\\test\\qwe'),), {})
b = ((u'other_path/test/qwe',), {})

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.