[py-svn] r35059 - py/dist/py/path/svn/testing
guido at codespeak.net
guido at codespeak.net
Mon Nov 27 21:41:26 CET 2006
Author: guido
Date: Mon Nov 27 21:41:24 2006
New Revision: 35059
Modified:
py/dist/py/path/svn/testing/test_urlcommand.py
Log:
Fixed tests that only worked between 2005-11-24 and 2006-11-24.
Modified: py/dist/py/path/svn/testing/test_urlcommand.py
==============================================================================
--- py/dist/py/path/svn/testing/test_urlcommand.py (original)
+++ py/dist/py/path/svn/testing/test_urlcommand.py Mon Nov 27 21:41:24 2006
@@ -1,6 +1,9 @@
import py
from py.__.path.svn.urlcommand import InfoSvnCommand
-from py.__.path.svn.testing.svntestbase import CommonCommandAndBindingTests, getrepowc
+from py.__.path.svn.testing.svntestbase import CommonCommandAndBindingTests, \
+ getrepowc
+import datetime
+import time
try:
svnversion = py.path.local.sysfind('svn')
@@ -61,12 +64,13 @@
def test_svn_1_2(self):
line = " 2256 hpk 165 Nov 24 17:55 __init__.py"
info = InfoSvnCommand(line)
+ now = datetime.datetime.now()
assert info.last_author == 'hpk'
assert info.created_rev == 2256
assert info.kind == 'file'
- assert info.mtime == 1132854900.0
+ assert time.gmtime(info.mtime)[:6] == (now.year, 11, 24, 17, 55, 0)
assert info.size == 165
- assert info.time == 1132854900000000.0
+ assert info.time == info.mtime * 1000000
def test_svn_1_3(self):
line =" 4784 hpk 2 Jun 01 2004 __init__.py"
More information about the pytest-commit
mailing list