How to use the yoga.model.helpers.normalize_paths function in yoga

To help you get started, we’ve selected a few yoga examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wanadev / yoga / test / test_model_helpers.py View on Github external
def test_normalize_paths(self):
        paths = helpers.normalize_paths({
            "./images\\texture-1.png": True,
            "images/texture-2.png": True,
        })
        assert "images/texture-1.png" in paths
        assert "images/texture-2.png" in paths

        with pytest.raises(ValueError):
            helpers.normalize_paths({
                "images/texture.png": True,
                "./images/texture.png": True,
            })
github wanadev / yoga / test / test_model_helpers.py View on Github external
def test_normalize_paths(self):
        paths = helpers.normalize_paths({
            "./images\\texture-1.png": True,
            "images/texture-2.png": True,
        })
        assert "images/texture-1.png" in paths
        assert "images/texture-2.png" in paths

        with pytest.raises(ValueError):
            helpers.normalize_paths({
                "images/texture.png": True,
                "./images/texture.png": True,
            })