File: test_yamlutil.py

package info (click to toggle)
python-asdf 4.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,060 kB
  • sloc: python: 24,224; makefile: 123
file content (21 lines) | stat: -rw-r--r-- 550 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import pytest

import asdf


@pytest.fixture(scope="module")
def ctx_asdf_file():
    return asdf.AsdfFile()


@pytest.fixture()
def tagged_tree(tree, ctx_asdf_file):
    return asdf.yamlutil.custom_tree_to_tagged_tree(tree, ctx_asdf_file)


def test_custom_tree_to_tagged_tree(tree, ctx_asdf_file, benchmark):
    benchmark(asdf.yamlutil.custom_tree_to_tagged_tree, tree, ctx_asdf_file)


def test_tagged_tree_to_tagged_tree(tagged_tree, ctx_asdf_file, benchmark):
    benchmark(asdf.yamlutil.tagged_tree_to_custom_tree, tagged_tree, ctx_asdf_file)