

def test_corrupted_package(self):
    self.conan.run(('install %s --build missing' % str(self.conan_reference)))
    package_ref = PackageReference(self.conan_reference, '5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9')
    self.conan.run(('install %s --build missing' % str(self.conan_reference)))
    self.assertNotIn(('Package for %s does not exist' % str(self.conan_reference)), self.conan.user_io.out)
    self.assertIn(('%s: Already installed!' % str(self.conan_reference)), self.conan.user_io.out)
    package_path = self.conan.paths.package(package_ref)
    file_path = os.path.join(package_path, 'hello0/hello.go')
    save(file_path, 'BAD CONTENT')
    package_ref.conan.run(('install %s --build missing' % str(self.conan_reference)))
    self.assertIn(('%s: WARN: Bad package' % str(self.conan_reference)), self.conan.user_io.out)

dataset/ETHPy150Open conan-io/conan/conans/test/integration/manifest_validation_test.py ManifestValidationTest.test_corrupted_package/VarMisuse@138/253 `self`->`package_ref`