projects
/
OpenColorIO-Configs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated ordering of view and displays for Nuke-specific config file.
[OpenColorIO-Configs.git]
/
aces_1.0.0
/
python
/
aces_ocio
/
tests
/
tests_aces_config.py
diff --git
a/aces_1.0.0/python/aces_ocio/tests/tests_aces_config.py
b/aces_1.0.0/python/aces_ocio/tests/tests_aces_config.py
index
61acfa5
..
f41349e
100644
(file)
--- a/
aces_1.0.0/python/aces_ocio/tests/tests_aces_config.py
+++ b/
aces_1.0.0/python/aces_ocio/tests/tests_aces_config.py
@@
-5,16
+5,12
@@
Defines unit tests for *ACES* configuration.
"""
Defines unit tests for *ACES* configuration.
"""
+from __future__ import division
+
import hashlib
import os
import re
import shutil
import hashlib
import os
import re
import shutil
-import sys
-
-# TODO: Temporary ugly thing to be discussed, ideally the package should be
-# in PYTHONPATH.
-sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..'))
-
import tempfile
import unittest
import tempfile
import unittest
@@
-39,7
+35,7
@@
__all__ = ['REFERENCE_CONFIG_ROOT_DIRECTORY',
# TODO: Investigate how the current config has been generated to use it for
# tests.
# REFERENCE_CONFIG_ROOT_DIRECTORY = os.path.abspath(
# TODO: Investigate how the current config has been generated to use it for
# tests.
# REFERENCE_CONFIG_ROOT_DIRECTORY = os.path.abspath(
-#
os.path.join(os.path.dirname(__file__), '..', '..', '..'))
+# os.path.join(os.path.dirname(__file__), '..', '..', '..'))
REFERENCE_CONFIG_ROOT_DIRECTORY = '/colour-science/colour-ramblings/ocio/aces'
HASH_TEST_PATTERNS = ('\.3dl', '\.lut', '\.csp')
REFERENCE_CONFIG_ROOT_DIRECTORY = '/colour-science/colour-ramblings/ocio/aces'
HASH_TEST_PATTERNS = ('\.3dl', '\.lut', '\.csp')
@@
-105,11
+101,12
@@
class TestACESConfig(unittest.TestCase):
hashes = {}
for path in files_walker(directory,
filters_in=filters_in,
hashes = {}
for path in files_walker(directory,
filters_in=filters_in,
- filters_out=filters_out):
+ filters_out=filters_out,
+ flags=flags):
with open(path) as file:
with open(path) as file:
-
hash
= hashlib.md5(
+
digest
= hashlib.md5(
re.sub('\s', '', file.read())).hexdigest()
re.sub('\s', '', file.read())).hexdigest()
- hashes[path.replace(directory, '')] =
hash
+ hashes[path.replace(directory, '')] =
digest
return hashes
def test_ACES_config(self):
return hashes
def test_ACES_config(self):