File: assert_file_correct.py

package info (click to toggle)
python-asdf 2.7.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 3,248 kB
  • sloc: python: 13,104; makefile: 125
file content (22 lines) | stat: -rw-r--r-- 458 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
22
import argparse
from pathlib import Path

from common import assert_file_correct


def parse_args():
    parser = argparse.ArgumentParser(description="Confirm that an ASDF file generated by generate_file.py can be read")
    parser.add_argument("filename", help="the filename to test")
    return parser.parse_args()


def main():
    args = parse_args()

    path = Path(args.filename)

    assert_file_correct(path)


if __name__ == "__main__":
    main()