summaryrefslogtreecommitdiff
path: root/grc/tests/test_compiler.py
blob: fbdffd3e0f892082bf1438e27ac3ef6d2e49a349 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright 2016 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#

import pytest

from argparse import Namespace
from os import path
import tempfile

from grc.compiler import main

def test_compiler(capsys):
    args = Namespace(
        output=tempfile.gettempdir(),
        user_lib_dir=False,
        grc_files=[path.join(path.dirname(__file__), 'resources', 'test_compiler.grc')],
        run=True
    )

    main(args)

    out, err = capsys.readouterr()
    assert not err