示例#1
0
文件: extra.py 项目: socek/pymk
    def test_change_time(self):
        extra.touch(self.test_file)
        first_file_time = os.path.getmtime(self.test_file)

        sleep(0.01)
        extra.touch(self.test_file)
        second_file_time = os.path.getmtime(self.test_file)

        self.assertNotEqual(first_file_time, second_file_time)
示例#2
0
 def build(self):
     def copy_local_settings():
         logger.info('Copying local settings...')
         sourc_path = '../local/settings.py'
         destination_path = './skysoccer/settings/local.py'
         shutil.copyfile(sourc_path, destination_path)
     #-----------------------------------------------------------------------
     copy_local_settings()
     touch(self.output_file)
示例#3
0
文件: mkfile.py 项目: socek/razbiak
 def build(self):
     self.build_flag()
     touch(self.output_file)
示例#4
0
文件: extra.py 项目: socek/pymk
    def setUp(self):
        super(FindFilesTest, self).setUp()

        os.mkdir('first')
        os.mkdir('second')
        os.mkdir('third')

        extra.touch('file1.test')
        extra.touch('file2.test')
        extra.touch('file3.notest')

        for filename in ['file3.test', 'file4.test', 'file5.notest']:
            path = os.path.join('first', filename)
            extra.touch(path)

        for filename in ['file6.test', 'file7.test', 'file8.notest']:
            path = os.path.join('second', filename)
            extra.touch(path)

        for filename in ['file9.test', 'file10.test', 'file11.notest']:
            path = os.path.join('third', filename)
            extra.touch(path)
示例#5
0
文件: extra.py 项目: socek/pymk
 def test_new_file(self):
     actual_time = int(time())
     extra.touch(self.test_file)
     file_time = int(os.path.getmtime(self.test_file))
     self.assertTrue(os.path.exists(self.test_file))
     self.assertEqual(actual_time, file_time)
示例#6
0
 def build(self):
     run_cmd(['./bin/buildout'], True)
     touch('./bin/py')
示例#7
0
文件: base.py 项目: socek/pymk
 def touch(self, path, wait=0.01):
     if wait:
         sleep(wait)
     touch(path)