mirror of
https://github.com/cedricbonhomme/Stegano.git
synced 2025-06-28 03:06:14 +02:00
Updated CHANGELOG.
This commit is contained in:
parent
e490e32791
commit
0537c13a08
20 changed files with 89 additions and 92 deletions
|
@ -1,8 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Stegano - Stegano is a pure Python steganography module.
|
||||
# Copyright (C) 2010-2022 Cédric Bonhomme - https://www.cedricbonhomme.org
|
||||
# Copyright (C) 2010-2023 Cédric Bonhomme - https://www.cedricbonhomme.org
|
||||
#
|
||||
# For more information : https://git.sr.ht/~cedric/stegano
|
||||
#
|
||||
|
@ -25,8 +23,9 @@ __date__ = "$Date: 2017/03/01 $"
|
|||
__revision__ = "$Date: 2017/03/01 $"
|
||||
__license__ = "GPLv3"
|
||||
|
||||
import unittest
|
||||
import itertools
|
||||
import unittest
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
|
||||
|
@ -71,7 +70,7 @@ class TestGenerators(unittest.TestCase):
|
|||
|
||||
def test_eratosthenes(self):
|
||||
"""Test the Eratosthenes sieve."""
|
||||
with open("./tests/expected-results/eratosthenes", "r") as f:
|
||||
with open("./tests/expected-results/eratosthenes") as f:
|
||||
self.assertEqual(
|
||||
tuple(itertools.islice(generators.eratosthenes(), 168)),
|
||||
tuple(int(line) for line in f),
|
||||
|
@ -79,7 +78,7 @@ class TestGenerators(unittest.TestCase):
|
|||
|
||||
def test_composite(self):
|
||||
"""Test the composite sieve."""
|
||||
with open("./tests/expected-results/composite", "r") as f:
|
||||
with open("./tests/expected-results/composite") as f:
|
||||
self.assertEqual(
|
||||
tuple(itertools.islice(generators.composite(), 114)),
|
||||
tuple(int(line) for line in f),
|
||||
|
@ -87,7 +86,7 @@ class TestGenerators(unittest.TestCase):
|
|||
|
||||
def test_fermat(self):
|
||||
"""Test the Fermat generator."""
|
||||
with open("./tests/expected-results/fermat", "r") as f:
|
||||
with open("./tests/expected-results/fermat") as f:
|
||||
self.assertEqual(
|
||||
tuple(itertools.islice(generators.fermat(), 9)),
|
||||
tuple(int(line) for line in f),
|
||||
|
@ -95,7 +94,7 @@ class TestGenerators(unittest.TestCase):
|
|||
|
||||
def test_triangular_numbers(self):
|
||||
"""Test the Triangular numbers generator."""
|
||||
with open("./tests/expected-results/triangular_numbers", "r") as f:
|
||||
with open("./tests/expected-results/triangular_numbers") as f:
|
||||
self.assertEqual(
|
||||
tuple(itertools.islice(generators.triangular_numbers(), 54)),
|
||||
tuple(int(line) for line in f),
|
||||
|
@ -103,7 +102,7 @@ class TestGenerators(unittest.TestCase):
|
|||
|
||||
def test_mersenne(self):
|
||||
"""Test the Mersenne generator."""
|
||||
with open("./tests/expected-results/mersenne", "r") as f:
|
||||
with open("./tests/expected-results/mersenne") as f:
|
||||
self.assertEqual(
|
||||
tuple(itertools.islice(generators.mersenne(), 20)),
|
||||
tuple(int(line) for line in f),
|
||||
|
@ -111,7 +110,7 @@ class TestGenerators(unittest.TestCase):
|
|||
|
||||
def test_carmichael(self):
|
||||
"""Test the Carmichael generator."""
|
||||
with open("./tests/expected-results/carmichael", "r") as f:
|
||||
with open("./tests/expected-results/carmichael") as f:
|
||||
self.assertEqual(
|
||||
tuple(itertools.islice(generators.carmichael(), 33)),
|
||||
tuple(int(line) for line in f),
|
||||
|
@ -119,7 +118,7 @@ class TestGenerators(unittest.TestCase):
|
|||
|
||||
def test_ackermann_slow(self):
|
||||
"""Test the Ackermann set."""
|
||||
with open("./tests/expected-results/ackermann", "r") as f:
|
||||
with open("./tests/expected-results/ackermann") as f:
|
||||
self.assertEqual(generators.ackermann_slow(3, 1), int(f.readline()))
|
||||
self.assertEqual(generators.ackermann_slow(3, 2), int(f.readline()))
|
||||
|
||||
|
@ -127,13 +126,13 @@ class TestGenerators(unittest.TestCase):
|
|||
"""Test the Naive Ackermann generator"""
|
||||
gen = generators.ackermann_naive(3)
|
||||
next(gen)
|
||||
with open("./tests/expected-results/ackermann", "r") as f:
|
||||
with open("./tests/expected-results/ackermann") as f:
|
||||
self.assertEqual(next(gen), int(f.readline()))
|
||||
self.assertEqual(next(gen), int(f.readline()))
|
||||
|
||||
def test_ackermann_fast(self):
|
||||
"""Test the Ackermann set."""
|
||||
with open("./tests/expected-results/ackermann", "r") as f:
|
||||
with open("./tests/expected-results/ackermann") as f:
|
||||
self.assertEqual(generators.ackermann_fast(3, 1), int(f.readline()))
|
||||
self.assertEqual(generators.ackermann_fast(3, 2), int(f.readline()))
|
||||
self.assertEqual(generators.ackermann_fast(4, 1), int(f.readline()))
|
||||
|
@ -142,13 +141,13 @@ class TestGenerators(unittest.TestCase):
|
|||
"""Test the Ackermann generator"""
|
||||
gen = generators.ackermann(3)
|
||||
next(gen)
|
||||
with open("./tests/expected-results/ackermann", "r") as f:
|
||||
with open("./tests/expected-results/ackermann") as f:
|
||||
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:
|
||||
with open("./tests/expected-results/LFSR") as f:
|
||||
self.assertEqual(
|
||||
tuple(itertools.islice(generators.LFSR(2**8), 256)),
|
||||
tuple(int(line) for line in f),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue