mirror of
https://github.com/cedricbonhomme/Stegano.git
synced 2025-06-28 03:06:14 +02:00
Implemented LFSR generator with tests and CLI integration
This commit is contained in:
parent
bf094c0361
commit
9f032fffbc
4 changed files with 325 additions and 0 deletions
|
@ -128,6 +128,13 @@ class TestGenerators(unittest.TestCase):
|
|||
self.assertEqual(next(gen), int(f.readline()))
|
||||
self.assertEqual(next(gen), int(f.readline()))
|
||||
|
||||
def test_LFSR(self):
|
||||
""" Test the LFSR generator
|
||||
"""
|
||||
with open('./tests/expected-results/LFSR', 'r') as f:
|
||||
self.assertEqual(tuple(itertools.islice(generators.LFSR(2**8), 256)),
|
||||
tuple(int(line) for line in f))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue