Exemplo n.º 1
0
def test_sdsc_output(capsys, casesdir):
    """checks whether output to files works"""
    path = "{}a-an.xml".format(casesdir)
    sdsc.main([path, "/dev/null"])
    out, _ = capsys.readouterr()
    assert out == "/dev/null\n"
Exemplo n.º 2
0
def test_sdsc_version(capsys):
    """checks for output of sdsc --version"""
    assert sdsc.main(["--version"]) == 0
    out, _ = capsys.readouterr()
    assert sdsc.__version__ == out.split()[-1]
def test_sdsc_output(capsys, casesdir):
    """checks whether output to files works"""
    path = "{}a-an.xml".format(casesdir)
    sdsc.main([path, "/dev/null"])
    out, _ = capsys.readouterr()
    assert out == "/dev/null\n"
#
# Copyright (c) 2015 SUSE Linux GmbH
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
#

import sdsc
import sys

if __name__ == "__main__":
    sys.exit(sdsc.main(sys.argv[1:]))
def test_sdsc_version(capsys):
    """checks for output of sdsc --version"""
    assert sdsc.main(["--version"]) == 0
    out, _ = capsys.readouterr()
    assert sdsc.__version__ == out.split()[-1]