def test_signaturetranslatedanonymouspackage(): rcode = """ square <- function(x) { return(x^2) } cube <- function(x) { return(x^3) } """ powerpack = packages.STAP(rcode, "powerpack") assert hasattr(powerpack, 'square') assert hasattr(powerpack, 'cube')
def testNew(self): powerpack = packages.STAP(self.string, "powerpack") self.assertTrue(hasattr(powerpack, 'square')) self.assertTrue(hasattr(powerpack, 'cube'))