def testNoVersion(self):
        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))
testNoVersion : Verify friendly error message when version is forgotten
dataset/ETHPy150Open sassoftware/conary/conary_test/cvctest/recipetest.py/RecipeTest.testNoVersion