Exemplo n.º 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)
Exemplo n.º 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()
Exemplo n.º 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()
Exemplo n.º 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()
Exemplo n.º 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)