def testNoVersion(self):
        """
        testNoVersion : Verify friendly error message when version is forgotten
        """
        recipestr1 = """
class NoVersion(PackageRecipe):
    name = 'test'
    clearBuildReqs()
    
    def setup(r):
        pass
"""
        d = tempfile.mkdtemp(dir=self.workDir)
        os.chdir(d)
        self.writeFile('test.recipe', recipestr1)
        try:
            RecipeLoader(d % '/test.recipe', self.cfg)
        except RecipeFileError, m:
            errstr = ("Recipe in file/component 'test' did not contain "
                        "both a name and a version attribute.")
            assert(m.args[0].endswith(errstr))
dataset/ETHPy150Open sassoftware/conary/conary_test/cvctest/recipetest.py/RecipeTest.testNoVersion/operator `+` -> `%`