lorax/tests/cli/lib/toml-compare
Alexander Todorov de3f548025 tests: Compare blueprints as TOML objects, not strings
this is to avoid differences in ordering and white space. The same
approach is used on rhel7-extras branch.

Cherry-picked from 04bc5e9e86

Related: rhbz#1825190
2020-07-28 14:21:47 -07:00

14 lines
319 B
Python
Executable File

#!/usr/bin/env python3
import sys
import pytoml as toml
if len(sys.argv) != 3:
print("USAGE: ", __file__, "<blueprint-one.toml> <blueprint-two.toml>")
sys.exit(1)
blueprint_one = toml.loads(open(sys.argv[1]).read())
blueprint_two = toml.loads(open(sys.argv[2]).read())
assert blueprint_one == blueprint_two