Example #1
0
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')
Example #2
0
 def testNew(self):
     powerpack = packages.STAP(self.string, "powerpack")
     self.assertTrue(hasattr(powerpack, 'square'))
     self.assertTrue(hasattr(powerpack, 'cube'))