Menu

[09bd5b]: / pythonapi / pyeeg_unittest.py  Maximize  Restore  History

Download this file

26 lines (19 with data), 655 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import unittest
from pyeegtools import *
import numpy as np
import pylab as pl
class Test_imageproc(unittest.TestCase):
def setUp(self):
pass
def test_disttransform(self):
z=np.arange(1,100,dtype=np.int)
self.assertRaises(ValueError, disttransform_deadreckoning, z)
z2=np.zeros((100,100),dtype=np.int32)
z2[20,20]=1;
dt=disttransform_deadreckoning(z2)
pl.imshow(dt)
pl.show()
if __name__ == '__main__':
improcsuite = unittest.TestLoader().loadTestsFromTestCase(Test_imageproc)
suite=unittest.TestSuite([improcsuite])
unittest.TextTestRunner(verbosity=2).run(suite)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.