def test_create_file_action_list_p03_ren_simple_infile_cnt(self): self.assertEqual( kvjpg.create_file_action_list( [[dateval,os.path.join(dirstr,cntstr+'-IMG_2666.JPG')]], )[0], 'ren "c:\\test\\test1\\'+cntstr+'-IMG_2666.JPG" "CNT00010-IMG_2666.JPG"') self.assertEqual( kvjpg.create_file_action_list( [[dateval,os.path.join('',cntstr+'-IMG_2666.JPG')]], )[0], 'ren "'+cntstr+'-IMG_2666.JPG" "CNT00010-IMG_2666.JPG"')
def test_create_file_action_list_p02_ren_adddate_fullpath(self): self.assertEqual( kvjpg.create_file_action_list( [[dateval,os.path.join(dirstr,'IMG_2666.JPG')]], adddate=True)[0], 'ren "c:\\test\\test1\\IMG_2666.JPG" "2018-10-18-CNT00010-IMG_2666.JPG"') self.assertEqual( kvjpg.create_file_action_list( [[dateval,os.path.join('','IMG_2666.JPG')]], adddate=True)[0], 'ren "IMG_2666.JPG" "2018-10-18-CNT00010-IMG_2666.JPG"')
def test_create_file_action_list_p03_copy_simple_infile_cnt(self): self.assertEqual( kvjpg.create_file_action_list( [[dateval,os.path.join(dirstr,cntstr+'-IMG_2666.JPG')]], copytodir='c:/temp')[0], 'copy "c:\\test\\test1\\'+cntstr+'-IMG_2666.JPG" "c:\\temp\\CNT00010-IMG_2666.JPG"') self.assertEqual( kvjpg.create_file_action_list( [[dateval,os.path.join('',cntstr+'-IMG_2666.JPG')]], copytodir='c:/temp')[0], 'copy "'+cntstr+'-IMG_2666.JPG" "c:\\temp\\CNT00010-IMG_2666.JPG"')
def test_create_file_action_list_p01_ren_simple(self): self.assertEqual( kvjpg.create_file_action_list( [[dateval,os.path.join(dirstr,'IMG_2666.JPG')]], )[0], 'ren "c:\\test\\test1\\IMG_2666.JPG" "CNT00010-IMG_2666.JPG"') self.assertEqual( kvjpg.create_file_action_list( [[dateval,os.path.join('','IMG_2666.JPG')]], )[0], 'ren "IMG_2666.JPG" "CNT00010-IMG_2666.JPG"')
def test_create_file_action_list_p02_copy_adddate_fullpath(self): self.assertEqual( kvjpg.create_file_action_list( [[dateval,os.path.join(dirstr,'IMG_2666.JPG')]], copytodir='c:/temp', adddate=True)[0], 'copy "c:\\test\\test1\\IMG_2666.JPG" "c:\\temp\\2018-10-18-CNT00010-IMG_2666.JPG"') self.assertEqual( kvjpg.create_file_action_list( [[dateval,os.path.join('','IMG_2666.JPG')]], copytodir='c:/temp', adddate=True)[0], 'copy "IMG_2666.JPG" "c:\\temp\\2018-10-18-CNT00010-IMG_2666.JPG"')