Skip to content

Commit

Permalink
Adsk contrib - Ignore info log from inactive colorspaces test (Academ…
Browse files Browse the repository at this point in the history
…ySoftwareFoundation#1822)

* Fixing a warning in one of the python unit test
Removing expected info log in some python unit test
Removing expected info log about inactive colorspace in Cpp unit test

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

* Using sudio config instead of cg config where it makes sense
renaming unit test inactive_colospace to is_inactive

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>

---------

Signed-off-by: Cédrik Fuoco <cedrik.fuoco@autodesk.com>
Co-authored-by: Doug Walker <doug.walker@autodesk.com>
Signed-off-by: Brooke <beg9562@rit.edu>
  • Loading branch information
2 people authored and brkglvn01 committed Oct 23, 2023
1 parent a7a9693 commit f2ac1f0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
5 changes: 2 additions & 3 deletions tests/cpu/Config_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5662,17 +5662,16 @@ OCIO_ADD_TEST(Config, inactive_color_space)
OCIO::COLORSPACE_ALL, 1));
}

OCIO_ADD_TEST(Config, inactive_colorspaces)
OCIO_ADD_TEST(Config, is_inactive)
{
// Using Built-in config to test the getInactiveColorSpace method.
const std::string cgConfigName = "cg-config-v1.0.0_aces-v1.3_ocio-v2.1";
const std::string cgConfigName = "studio-config-v1.0.0_aces-v1.3_ocio-v2.1";
OCIO::ConstConfigRcPtr config;

OCIO_CHECK_NO_THROW(
config = OCIO::Config::CreateFromBuiltinConfig(cgConfigName.c_str())
);
OCIO_REQUIRE_ASSERT(config);

OCIO_CHECK_NO_THROW(config->validate());

{
Expand Down
4 changes: 2 additions & 2 deletions tests/python/ConfigTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ def test_resolve_config(self):
)

def test_inactive_colorspaces(self):
config = OCIO.Config.CreateFromBuiltinConfig("cg-config-v1.0.0_aces-v1.3_ocio-v2.1")
config = OCIO.Config.CreateFromBuiltinConfig("studio-config-v1.0.0_aces-v1.3_ocio-v2.1")
config.validate()

# Test various combinations of input.
Expand All @@ -1234,7 +1234,7 @@ def test_inactive_colorspaces(self):
self.assertTrue(config.isInactiveColorSpace("Rec.1886 Rec.2020 - Display"))

def test_roles(self):
config = OCIO.Config.CreateFromBuiltinConfig("cg-config-v1.0.0_aces-v1.3_ocio-v2.1")
config = OCIO.Config.CreateFromBuiltinConfig("studio-config-v1.0.0_aces-v1.3_ocio-v2.1")
config.validate()

# *****************************
Expand Down
5 changes: 5 additions & 0 deletions tests/python/UnitTestUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ def __exit__(self, exc_type, exc_val, exc_tb):
- !<ColorSpace>
name: c3
categories: [sample]
- !<ColorSpace>
name: c4
encoding: log
categories: [sample]
"""

SAMPLE_CONFIG = """ocio_profile_version: 2
Expand Down

0 comments on commit f2ac1f0

Please sign in to comment.