Edgewall Software
Modify

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#11045 closed defect (fixed)

Test failures in tracopt.versioncontrol.git.tests.PyGIT.UnicodeNameTestCase

Reported by: Dirkjan Ochtman <dirkjan@…> Owned by: Christian Boos
Priority: low Milestone: 1.0.2
Component: plugin/git Version: 1.0
Severity: minor Keywords:
Cc: Branch:
Release Notes:

Fix for failure in Git unit tests when the author info isn't available.

API Changes:

Description

I've got three failing tests:

======================================================================
ERROR: test_unicode_branches (tracopt.versioncontrol.git.tests.PyGIT.UnicodeNameTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/tracopt/versioncontrol/git/tests/PyGIT.py", line 157, in setUp
    self._git('commit', '-a', '-m', 'test')
  File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/tracopt/versioncontrol/git/tests/PyGIT.py", line 168, in _git
    assert proc.returncode == 0
AssertionError

======================================================================
ERROR: test_unicode_filename (tracopt.versioncontrol.git.tests.PyGIT.UnicodeNameTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/tracopt/versioncontrol/git/tests/PyGIT.py", line 157, in setUp
    self._git('commit', '-a', '-m', 'test')
  File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/tracopt/versioncontrol/git/tests/PyGIT.py", line 168, in _git
    assert proc.returncode == 0
AssertionError

======================================================================
ERROR: test_unicode_tags (tracopt.versioncontrol.git.tests.PyGIT.UnicodeNameTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/tracopt/versioncontrol/git/tests/PyGIT.py", line 157, in setUp
    self._git('commit', '-a', '-m', 'test')
  File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/tracopt/versioncontrol/git/tests/PyGIT.py", line 168, in _git
    assert proc.returncode == 0
AssertionError

======================================================================
ERROR: test_unicode_verifyrev (tracopt.versioncontrol.git.tests.PyGIT.UnicodeNameTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/tracopt/versioncontrol/git/tests/PyGIT.py", line 157, in setUp
    self._git('commit', '-a', '-m', 'test')
  File "/var/tmp/portage/www-apps/trac-1.0.1/work/Trac-1.0.1/tracopt/versioncontrol/git/tests/PyGIT.py", line 168, in _git
    assert proc.returncode == 0
AssertionError

I don't see these fail with 1.0. I've got git 1.7.12.4 installed, on Gentoo Linux.

Attachments (0)

Change History (6)

comment:1 by Christian Boos, 7 years ago

Ah, those tests are if os.name != 'nt'… testing now on Linux:

~/trac/1.0-stable> PYTHONPATH=. python tracopt/versioncontrol/git/tests/PyGIT.py -v
test_git_version (__main__.GitTestCase) ... ok
test_is_sha (__main__.GitTestCase) ... ok
test_parse (__main__.TestParseCommit) ... ok
test_unicode_branches (__main__.UnicodeNameTestCase) ... ok
test_unicode_filename (__main__.UnicodeNameTestCase) ... ok
test_unicode_tags (__main__.UnicodeNameTestCase) ... ok
test_unicode_verifyrev (__main__.UnicodeNameTestCase) ... ok

----------------------------------------------------------------------
Ran 7 tests in 0.211s

OK
~/trac/1.0-stable> git --version
git version 1.7.10.4

locale set to en_US.UTF-8. Anything special on your side regarding locale? And if you could get back the error messages of the failing git processes, that would give us a hint.

comment:2 by Dirkjan Ochtman <dirkjan@…>, 7 years ago

I get this from printing proc.stderr:

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'root@miles.(none)')

comment:3 by Dirkjan Ochtman <dirkjan@…>, 7 years ago

And nothing special regarding locale, everything is set to en_US.UTF-8 on my box, as well.

in reply to:  2 comment:4 by Christian Boos, 7 years ago

Owner: set to Christian Boos
Status: newassigned

Replying to Dirkjan Ochtman <dirkjan@…>:

I get this from printing proc.stderr:

*** Please tell me who you are.
...
fatal: unable to auto-detect email address (got 'root@miles.(none)')

Ok, nothing critical then. We could indeed add the user info to the commit, for such cases.

comment:5 by Joé <joe@…>, 7 years ago

Resolution: fixed
Severity: normalminor
Status: assignedclosed

Should be fixed in r11675.

comment:6 by Ryan J Ollos, 6 years ago

Release Notes: modified (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from Christian Boos 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.