[py-svn] r28146 - py/dist/py/path/svn/testing

jan at codespeak.net jan at codespeak.net
Sat Jun 3 12:45:37 CEST 2006


Author: jan
Date: Sat Jun  3 12:45:36 2006
New Revision: 28146

Modified:
   py/dist/py/path/svn/testing/test_urlcommand.py
Log:
added tests for the InfoSvnCommand fix in urlcommand.py 


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	Sat Jun  3 12:45:36 2006
@@ -1,4 +1,5 @@
 import py
+from py.__.path.svn.urlcommand import InfoSvnCommand
 from py.__.path.svn.testing.svntestbase import CommonCommandAndBindingTests, getrepowc
 
 try:
@@ -24,3 +25,25 @@
         from time import gmtime
         t = gmtime(res[0].date)
         assert t.tm_year == 2003 and t.tm_mon == 7 and t.tm_mday == 17
+
+
+class TestSvnInfoCommand:
+
+    def test_svn_1_2(self):
+        line = "   2256      hpk        165 Nov 24 17:55 __init__.py"
+        info = InfoSvnCommand(line)
+        assert info.last_author == 'hpk'
+        assert info.created_rev == 2256
+        assert info.kind == 'file'
+        assert info.mtime == 1132851300.0
+        assert info.size ==  165
+        assert info.time == 1132851300000000.0
+
+        py.std.pprint.pprint(info.__dict__)
+        assert 0
+
+    def test_svn_1_3(self):
+        line ="    4784 hpk                 2 Jun 01  2004 __init__.py"
+        info = InfoSvnCommand(line)
+        assert info.last_author == 'hpk'
+        assert info.kind == 'file'



More information about the pytest-commit mailing list