diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2011-07-31 19:54:53 +0200 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2011-07-31 19:54:53 +0200 |
commit | e8988522041ce8b02f6c6cf99e5dae4bca194957 (patch) | |
tree | 53093b5e0367185d93f367542abfcfc2c6f49f78 /tests | |
parent | b24b3ae0da36b8f3e31308d2c87786d08dc211a3 (diff) | |
download | rsa-git-e8988522041ce8b02f6c6cf99e5dae4bca194957.tar.gz |
Added yield_fixedblock
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_blocks.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_blocks.py b/tests/test_blocks.py index 8481c3c..ce5f03a 100644 --- a/tests/test_blocks.py +++ b/tests/test_blocks.py @@ -65,4 +65,11 @@ class VarblockTest(unittest.TestCase): varblocks = list(blocks.yield_varblocks(infile)) self.assertEqual(['12345', 'Sybren'], varblocks) +class FixedblockTest(unittest.TestCase): + def test_yield_fixedblock(self): + + infile = StringIO('123456Sybren') + + fixedblocks = list(blocks.yield_fixedblocks(infile, 6)) + self.assertEqual(['123456', 'Sybren'], fixedblocks) |