Beispiel #1
0
class fractalMosaicTestCase(unittest.TestCase):
    """Test cases for FractalMosaic."""
    
    def setUp(self):
        """Set up."""
        
        self.mosaic = FractalMosaic('./dali')
        
    def tearDown(self):
        """Clean up."""
        
        self.mosaic = None
        
    def testCreateMosaic(self):
        """Test creating a fractal mosaic."""
        
        self.mosaic.create_mosaic('./karan.jpg', MIN_SIZE, THRESHOLD)
        self.mosaic.save_as('./output_fractal.jpeg')
Beispiel #2
0
 def setUp(self):
     """Set up."""
     
     self.mosaic = FractalMosaic('./dali')
Beispiel #3
0
def test_speed_fractal():
    m = FractalMosaic("dali")
    m.create_mosaic("karan.jpg", 20, 60)
    m.save_as("karan_mosaic.jpg")
Beispiel #4
0
def test_speed_fractal():
    m = FractalMosaic('dali')
    m.create_mosaic('karan.jpg', 20, 60)
    m.save_as('karan_mosaic.jpg')