How to use the tuna.read_import_profile function in tuna

To help you get started, we’ve selected a few tuna 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 nschloe / tuna / test / test_tuna.py View on Github external
],
                        "color": 0,
                    },
                    {"name": "d", "value": 4e-06, "color": 0},
                ],
                "color": 0,
            }
        ],
    }

    with tempfile.TemporaryDirectory() as temp_dir:
        filepath = Path(temp_dir) / "test.log"
        with open(filepath, "w") as f:
            f.write(content)

        out = tuna.read_import_profile(filepath)

    assert out == ref, ref
github nschloe / tuna / test / test_tuna.py View on Github external
"name": "b",
                        "value": 2e-06,
                        "color": 0,
                        "children": [{"name": "c", "value": 3e-06, "color": 0}],
                    }
                ],
            }
        ],
    }

    with tempfile.TemporaryDirectory() as temp_dir:
        filepath = Path(temp_dir) / "test.log"
        with open(filepath, "w") as f:
            f.write(content)

        out = tuna.read_import_profile(filepath)

    assert out == ref, ref