Add tests about issue #54, according to comments by @bilderbuchi

This commit is contained in:
Vincent Jacques
2012-07-10 18:09:35 +02:00
parent f6a3490e7b
commit 4e85f4178a
11 changed files with 111 additions and 41 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ class BasicGithubObject( object ):
@staticmethod
def _parseTimezone( s ):
assert len( s ) == 25
return int( s[ 19 : 22 ] ) + int( s[ 23 : 25 ] ) / 60.
return ( -1 if s[ 19 ] == '-' else 1 ) * datetime.timedelta( hours = int( s[ 20 : 22 ] ), minutes = int( s[ 23 : 25 ] ) )
class GithubObject( BasicGithubObject ):
def __init__( self, requester, attributes, completed ):