hydrus/include/TestHydrusImageHandling.py

16 lines
402 B
Python
Raw Normal View History

2014-05-07 22:42:30 +00:00
import collections
import HydrusConstants as HC
import HydrusImageHandling
import os
import TestConstants
import unittest
class TestImageHandling( unittest.TestCase ):
def test_phash( self ):
2015-11-04 22:30:28 +00:00
phash = HydrusImageHandling.GeneratePerceptualHash( os.path.join( HC.STATIC_DIR, 'hydrus.png' ) )
2014-05-07 22:42:30 +00:00
2014-06-11 21:20:42 +00:00
self.assertEqual( phash, '\xb0\x08\x83\xb2\x08\x0b8\x08' )
2014-05-07 22:42:30 +00:00