Beispiel #1
0
 def test3_cp(self):
     """Test cp."""
     sys.argv = ["--FILE", "testfile"]
     if _platform == "linux":
         CpApp.main()
         os.chmod("testfile", 000)
         self.assertRaises(SystemExit, CpApp.main)
         os.chmod("testfile", 644)
Beispiel #2
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()
Beispiel #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()
Beispiel #4
0
 def test3_cp(cls):
     """Test copy."""
     sys.argv = ['--INPUT', 'forcp.ini', '--OUTPUT', 'cp.ini']
     CpApp.main()
     assert os.path.exists('cp.ini')
     assert 'COPY' in open('cp.ini', 'r').read()
Beispiel #5
0
 def test3_cp(self):
     sys.argv = ["--FILE", "testfile"]
     CpApp.main()
     os.chmod("testfile", 000)
     self.assertRaises(SystemExit, CpApp.main)
     os.chmod("testfile", 644)