Edgewall Software
Modify

Opened 3 weeks ago

Closed 3 weeks ago

#13879 closed defect (fixed)

2 unit tests failed when the filename has a colon character in test data on Windows

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.6.1
Component: plugin/git Version:
Severity: normal Keywords: windows
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Added a workaround for tests failing on Windows if the filename contains colon characters.

Description

The unit tests failed on Windows but passes on Ubuntu and macOS. It is probably caused by changes in the behavior of git command.

======================================================================
FAIL: test_colon_character_in_filename (tracopt.versioncontrol.git.tests.git_fs.GitRepositoryTestCase.test_colon_character_in_filename)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\trac\trac\tracopt\versioncontrol\git\tests\git_fs.py", line 809, in test_colon_character_in_filename
    self._git_fast_import(self._data_colon_character_in_filename)
  File "D:\a\trac\trac\tracopt\versioncontrol\git\tests\git_fs.py", line 76, in _git_fast_import
    self.assertEqual(0, proc.returncode,
AssertionError: 0 != 128 : git exits with 128, stdout b'', stderr b"fatal: invalid path ':100644.txt'\nfast-import: dumping crash report to .git/fast_import_crash_5552\n"

======================================================================
FAIL: test_colon_character_in_filename (tracopt.versioncontrol.git.tests.git_fs.GitCachedRepositoryTestCase.test_colon_character_in_filename)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\a\trac\trac\tracopt\versioncontrol\git\tests\git_fs.py", line 809, in test_colon_character_in_filename
    self._git_fast_import(self._data_colon_character_in_filename)
  File "D:\a\trac\trac\tracopt\versioncontrol\git\tests\git_fs.py", line 76, in _git_fast_import
    self.assertEqual(0, proc.returncode,
AssertionError: 0 != 128 : git exits with 128, stdout b'', stderr b"fatal: invalid path ':100644.txt'\nfast-import: dumping crash report to .git/fast_import_crash_2088\n"

----------------------------------------------------------------------
Ran 2507 tests in 119.984s

FAILED (failures=2, skipped=17)

Attachments (0)

Change History (1)

comment:1 by Jun Omae, 3 weeks ago

Internal Changes: modified (diff)
Keywords: windows added
Resolution: fixed
Status: assignedclosed

Fixed in [17894] and merged in [17895].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jun Omae to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.