Skip to content

Commit

Permalink
Changes for CI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Jan 14, 2024
1 parent 386c03d commit 5373793
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 8 deletions.
23 changes: 19 additions & 4 deletions dfvfs/encryption/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
# -*- coding: utf-8 -*-
"""Imports for the encryption manager."""

from dfvfs.encryption import aes_decrypter
from dfvfs.encryption import blowfish_decrypter
from dfvfs.encryption import des3_decrypter
from dfvfs.encryption import rc4_decrypter
try:
from dfvfs.encryption import aes_decrypter
except RuntimeError:
pass

try:
from dfvfs.encryption import blowfish_decrypter
except RuntimeError:
pass

try:
from dfvfs.encryption import des3_decrypter
except RuntimeError:
pass

try:
from dfvfs.encryption import rc4_decrypter
except RuntimeError:
pass
7 changes: 6 additions & 1 deletion tests/encryption/aes_decrypter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@

import unittest

from dfvfs.encryption import aes_decrypter
try:
from dfvfs.encryption import aes_decrypter
except RuntimeError:
aes_decrypter = None

from dfvfs.lib import definitions
from dfvfs.lib import errors

from tests.encryption import test_lib


@unittest.skipIf(aes_decrypter is None, 'requires AES encryption support')
class AESDecrypterTestCase(test_lib.DecrypterTestCase):
"""Tests for the AES decrypter object."""

Expand Down
8 changes: 7 additions & 1 deletion tests/encryption/blowfish_decrypter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@

import unittest

from dfvfs.encryption import blowfish_decrypter
try:
from dfvfs.encryption import blowfish_decrypter
except RuntimeError:
blowfish_decrypter = None

from dfvfs.lib import definitions
from dfvfs.lib import errors

from tests.encryption import test_lib


@unittest.skipIf(
blowfish_decrypter is None, 'requires Blowfish encryption support')
class BlowfishDecrypterTestCase(test_lib.DecrypterTestCase):
"""Tests for the Blowfish decrypter object."""

Expand Down
8 changes: 7 additions & 1 deletion tests/encryption/des3_decrypter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@

import unittest

from dfvfs.encryption import des3_decrypter
try:
from dfvfs.encryption import des3_decrypter
except RuntimeError:
des3_decrypter = None

from dfvfs.lib import definitions
from dfvfs.lib import errors

from tests.encryption import test_lib


@unittest.skipIf(
des3_decrypter is None, 'requires tripple DES encryption support')
class DES3DecrypterTestCase(test_lib.DecrypterTestCase):
"""Tests for the triple DES decrypter object."""

Expand Down
7 changes: 6 additions & 1 deletion tests/encryption/rc4_decrypter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@

import unittest

from dfvfs.encryption import rc4_decrypter
try:
from dfvfs.encryption import rc4_decrypter
except RuntimeError:
rc4_decrypter = None

from dfvfs.lib import errors

from tests.encryption import test_lib


@unittest.skipIf(rc4_decrypter is None, 'requires RC4 encryption support')
class RC4DecrypterTestCase(test_lib.DecrypterTestCase):
"""Tests for the RC4 decrypter object."""

Expand Down

0 comments on commit 5373793

Please sign in to comment.