Esempio n. 1
0
    def test_optional_existing_dest(self):
        p = self.tmppath("dest")
        with open(p, "a"):
            pass

        f = ExistingFile(required=False)
        f.copy(p)
Esempio n. 2
0
    def test_required_existing_dest(self):
        p = self.tmppath("dest")
        with open(p, "a"):
            pass

        f = ExistingFile(required=True)
        f.copy(p)
Esempio n. 3
0
    def test_required_existing_dest(self):
        p = self.tmppath('dest')
        with open(p, 'a'):
            pass

        f = ExistingFile(required=True)
        f.copy(p)
Esempio n. 4
0
    def test_optional_existing_dest(self):
        p = self.tmppath('dest')
        with open(p, 'a'):
            pass

        f = ExistingFile(required=False)
        f.copy(p)
Esempio n. 5
0
    def test_required_existing_dest(self):
        p = self.tmppath('dest')
        with open(p, 'a'):
            pass

        f = ExistingFile(required=True)
        f.copy(p)
Esempio n. 6
0
    def test_required_existing_dest(self):
        p = self.tmppath("dest")
        with open(p, "a"):
            pass

        f = ExistingFile(required=True)
        f.copy(p)
Esempio n. 7
0
 def test_optional_missing_dest(self):
     f = ExistingFile(required=False)
     f.copy(self.tmppath("dest"))
Esempio n. 8
0
 def test_required_missing_dest(self):
     with self.assertRaisesRegexp(ErrorMessage, "Required existing file"):
         f = ExistingFile(required=True)
         f.copy(self.tmppath("dest"))
Esempio n. 9
0
 def test_optional_missing_dest(self):
     f = ExistingFile(required=False)
     f.copy(self.tmppath('dest'))
Esempio n. 10
0
 def test_required_missing_dest(self):
     with self.assertRaisesRegexp(ErrorMessage, 'Required existing file'):
         f = ExistingFile(required=True)
         f.copy(self.tmppath('dest'))