File: utils.py.in

package info (click to toggle)
aoflagger 3.4.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,960 kB
  • sloc: cpp: 83,076; python: 10,187; sh: 260; makefile: 178
file content (12 lines) | stat: -rw-r--r-- 445 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
import os
from subprocess import check_call, check_output
from testconfig import taql

def assert_taql(command, expected_rows=0):
    result = check_output([taql, "-noph", command]).decode().strip()
    assert result == f"select result of {expected_rows} rows"

def untar_ms(source):
    if not os.path.isfile(source):
        raise IOError(f"Not able to find {source} containing the reference solutions.")
    check_call(["tar", "xf", source])