Пример #1
0
 def test3_cp(self):
     sys.argv = ["--FILE", "testfile"]
     if _platform == "linux":
         CpApp.main()
         os.chmod("testfile", 000)
         self.assertRaises(SystemExit, CpApp.main)
         os.chmod("testfile", 644)
Пример #2
0
def echo(infile, outfile):
    sys.argv = ["--INPUT", infile, "--OUTPUT", outfile]
    CpApp.main()
Пример #3
0
 def test3_cp(self):
     sys.argv = ['--INPUT', 'forcp.ini', '--OUTPUT', 'cp.ini']
     CpApp.main()
     assert os.path.exists('cp.ini')
     assert 'COPY' in open('cp.ini').read()
Пример #4
0
def echo(infile, outfile):
    sys.argv = ['--INPUT', infile, '--OUTPUT', outfile]
    CpApp.main()