MCPcopy
hub / github.com/deadc0de6/dotdrop / test_generic

Method test_generic

tests/test_misc.py:226–241  ·  view source on GitHub ↗

test importer

(self)

Source from the content-addressed store, hash-verified

224
225 @patch('sys.stdin', StringIO('y\n'))
226 def test_generic(self):
227 """test importer"""
228 with self.assertRaises(UndefinedException):
229 Importer('', None, '', '', {})
230
231 imp = Importer('profile', None, '', '', {})
232 self.assertEqual(imp.import_path('/abc'), -1)
233
234 tmpdir = get_tempdir()
235 self.addCleanup(clean, tmpdir)
236 path1, _ = create_random_file(tmpdir, content='left')
237 path2, _ = create_random_file(tmpdir, content='right')
238 imp.safe = True
239 self.assertTrue(imp._check_existing_dotfile(path1, path2))
240 path2, _ = create_random_file(tmpdir, content='left')
241 self.assertTrue(imp._check_existing_dotfile(path1, path2))
242
243 def test_apply_trans(self):
244 """test apply_trans"""

Callers

nothing calls this directly

Calls 5

import_pathMethod · 0.95
ImporterClass · 0.90
get_tempdirFunction · 0.90
create_random_fileFunction · 0.90

Tested by

no test coverage detected