1 import unittest
, setup_path
4 from cStringIO
import StringIO
6 # Test case for svn.delta
7 class DeltaTestCase(unittest
.TestCase
):
9 def testTxWindowHandler(self
):
10 """Test tx_invoke_window_handler"""
11 src_stream
= StringIO("hello world");
12 target_stream
= StringIO("bye world");
14 # Invoke the window_handler using a helper function
15 window_handler
, baton
= \
16 svn
.delta
.tx_apply(src_stream
, target_stream
, None)
17 svn
.delta
.tx_invoke_window_handler(window_handler
, None, baton
)
19 # Invoke the window_handler directly (easier!)
20 window_handler
, baton
= \
21 svn
.delta
.tx_apply(src_stream
, target_stream
, None)
22 window_handler(None, baton
)
25 return unittest
.makeSuite(DeltaTestCase
, 'test')
27 if __name__
== '__main__':
28 runner
= unittest
.TextTestRunner()