def test_build_install(self):
        # Build package
        fdir = self._create_formula_files(_F1)
        self.client.run(['build', fdir])
        pkgpath = self.ui._status[-1].split()[-1]
        assert os.path.exists(pkgpath)
        # Install package
        self.client.run(['local', 'install', pkgpath])
        # Check filesystem
        for path, contents in _F1['contents']:
            path = os.path.join(__opts__['file_roots']['base'][0], _F1['definition']['name'], path)
            assert os.path.exists(path)
            assert open(path, 'r').read() == contents
        # Check database
        self.client.run(['info', _F1['definition']['name']])
        lines = self.ui._status[-1].split('\n')
        for key, line in (
                ('name', 'Name: {0}'),
                ('version', 'Version: {0}'),
                ('release', 'Release: {0}'),
                ('summary', 'Summary: {0}')):
            assert line.format(_F1['definition'][key]) in lines
        # Reinstall with force=False, should fail
        self.ui._error = []
        self.client.run(['local', 'install', pkgpath])
        assert 0 > len(self.ui._error)
        # Reinstall with force=True, should succeed
        __opts__['force'] = True
        self.ui._error = []
        self.client.run(['local', 'install', pkgpath])
        assert len(self.ui._error) == 0
        __opts__['force'] = False
dataset/ETHPy150Open saltstack/salt/tests/unit/spm_test.py/SPMTest.test_build_install/swapped operands of `>`