import subprocess
from pytest import raises


class Script(object):
    script_name = 'teuthology'

    def test_help(self):
        args = (self.script_name, '--help')
        out = subprocess.check_output(args).decode()
        assert out.startswith('usage')

    def test_invalid(self):
        args = (self.script_name, '--invalid-option')
        with raises(subprocess.CalledProcessError):
            subprocess.check_call(args)

b82418590e5ceeacae043191886250fc1a1a3677
<mask token>


class Script(object):
    <mask token>
    <mask token>

    def test_invalid(self):
        args = self.script_name, '--invalid-option'
        with raises(subprocess.CalledProcessError):
            subprocess.check_call(args)

<mask token>


class Script(object):
    <mask token>

    def test_help(self):
        args = self.script_name, '--help'
        out = subprocess.check_output(args).decode()
        assert out.startswith('usage')

    def test_invalid(self):
        args = self.script_name, '--invalid-option'
        with raises(subprocess.CalledProcessError):
            subprocess.check_call(args)

<mask token>


class Script(object):
    script_name = 'teuthology'

    def test_help(self):
        args = self.script_name, '--help'
        out = subprocess.check_output(args).decode()
        assert out.startswith('usage')

    def test_invalid(self):
        args = self.script_name, '--invalid-option'
        with raises(subprocess.CalledProcessError):
            subprocess.check_call(args)

import subprocess
from pytest import raises


class Script(object):
    script_name = 'teuthology'

    def test_help(self):
        args = self.script_name, '--help'
        out = subprocess.check_output(args).decode()
        assert out.startswith('usage')

    def test_invalid(self):
        args = self.script_name, '--invalid-option'
        with raises(subprocess.CalledProcessError):
            subprocess.check_call(args)

import subprocess
from pytest import raises


class Script(object):
    script_name = 'teuthology'

    def test_help(self):
        args = (self.script_name, '--help')
        out = subprocess.check_output(args).decode()
        assert out.startswith('usage')

    def test_invalid(self):
        args = (self.script_name, '--invalid-option')
        with raises(subprocess.CalledProcessError):
            subprocess.check_call(args)
