Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def constructor(self):
self.kanwa = genkanwadict.mkkanwa()
self.assertEqual(self.kanwa, object)
def test_mkdict(self):
if self.kanwa is None:
self.kanwa = genkanwadict.mkkanwa()
src = os.path.join('tests', 'kanadict.utf8')
dst = os.path.join(self.tmpdir, 'test_kanadict.pickle')
self.kanwa.mkdict(src, dst)
# load test
with open(dst, 'rb') as f:
(mydict, maxkeylen) = pickle.load(f)
f.close()
self.assertTrue(isinstance(mydict, dict))
self.assertEqual(maxkeylen, 3)