def test__get_graphviz_extension_valid(self): """Get a valid graphviz extension.""" # Run result = Metadata._get_graphviz_extension('/some/path.png') # Asserts assert result == ('/some/path', 'png')
def test__get_graphviz_extension_none(self): """Get graphviz with path equals to None.""" # Run result = Metadata._get_graphviz_extension(None) # Asserts assert result == (None, None)
def test__get_graphviz_extension_invalid_extension(self): """Raises a ValueError when the path contains an invalid extension.""" with pytest.raises(ValueError): Metadata._get_graphviz_extension('/some/path.foo')
def test__get_graphviz_extension_path_without_extension(self): """Raises a ValueError when the path doesn't contains an extension.""" with pytest.raises(ValueError): Metadata._get_graphviz_extension('/some/path')