# -*- coding: utf-8 -*-
"""
-Defines unit tests for the generated *ACES* configuration.
+Defines unit tests for *ACES* configuration.
"""
import hashlib
ACES_OCIO_CTL_DIRECTORY_ENVIRON,
createACESConfig)
-__author__ = ''
-__copyright__ = ''
+__author__ = 'ACES Developers'
+__copyright__ = 'Copyright (C) 2014 - 2015 - ACES Developers'
__license__ = ''
-__maintainer__ = ''
-__email__ = ''
-__status__ = ''
+__maintainer__ = 'ACES Developers'
+__email__ = 'aces@oscars.org'
+__status__ = 'Production'
__all__ = ['REFERENCE_CONFIG_ROOT_DIRECTORY',
'HASH_TEST_PATTERNS',
class TestACESConfig(unittest.TestCase):
"""
+ Performs tests on the *ACES* configuration.
"""
def setUp(self):
shutil.rmtree(self.__temporary_directory)
@staticmethod
- def directory_hashes(directory, filters_in=None, filters_out=None):
+ def directory_hashes(directory,
+ filters_in=None,
+ filters_out=None,
+ flags=0):
"""
+ Recursively computes the hashes from the file within given directory.
+
+ Parameters
+ ----------
+ directory : str or unicode
+ Directory to compute the file hashes.
+ filters_in : array_like
+ Included patterns.
+ filters_out : array_like
+ Excluded patterns.
+ flags : int
+ Regex flags.
+
+ Returns
+ -------
+ dict
+ Directory file hashes.
"""
hashes = {}
def test_ACES_config(self):
"""
+ Performs tests on the *ACES* configuration by computing hashes on the
+ generated configuration and comparing them to the existing one.
"""
self.assertTrue(createACESConfig(self.__aces_ocio_ctl_directory,