def xzImage ( self, zscale ):
    zdim,ydim,xdim = self.data.shape[1:]
    outimage = Image.frombuffer ( 'L', (xdim,zdim), self.data[0,:,0,:].flatten(), 'raw', 'L', 0, 1 ) 
    #if the image scales to 0 pixels it don't work
    return outimage.resize ( [xdim, int(zdim*zscale)] )
Invoke an os method in both real and fake contexts and compare results.
dataset/ETHPy150Open neurodata/ndstore/ocpca/timecube.py/TimeCube8.xzImage--crossover with--dataset/ETHPy150Open jmcgeheeiv/pyfakefs/fake_filesystem_vs_real_test.py/FakeFilesystemVsRealTest._CompareBehaviors