Exemplo n.º 1
0
    def test_expand_path_with_tilde(self):
        test_path = '~/otherdir/somefile'
        with mock.patch.dict(os.environ):
            os.environ['HOME'] = user_path = '/home/user/'
            result = config.expand_path(self.working_dir, test_path)

        self.assertEqual(result, user_path + 'otherdir/somefile')
Exemplo n.º 2
0
    def test_expand_path_with_tilde(self):
        test_path = '~/otherdir/somefile'
        with mock.patch.dict(os.environ):
            os.environ['HOME'] = user_path = '/home/user/'
            result = config.expand_path(self.working_dir, test_path)

        self.assertEqual(result, user_path + 'otherdir/somefile')
Exemplo n.º 3
0
    def test_expand_path_with_tilde(self):
        test_path = "~/otherdir/somefile"
        with mock.patch.dict(os.environ):
            os.environ["HOME"] = user_path = "/home/user/"
            result = config.expand_path(self.working_dir, test_path)

        self.assertEqual(result, user_path + "otherdir/somefile")
Exemplo n.º 4
0
 def test_expand_path_absolute(self):
     abs_path = '/home/user/otherdir/somefile'
     result = config.expand_path(self.working_dir, abs_path)
     self.assertEqual(result, abs_path)
Exemplo n.º 5
0
 def test_expand_path_normal(self):
     result = config.expand_path(self.working_dir, 'myfile')
     self.assertEqual(result, self.working_dir + '/' + 'myfile')
Exemplo n.º 6
0
 def test_expand_path_absolute(self):
     abs_path = '/home/user/otherdir/somefile'
     result = config.expand_path(self.working_dir, abs_path)
     self.assertEqual(result, abs_path)
Exemplo n.º 7
0
 def test_expand_path_normal(self):
     result = config.expand_path(self.working_dir, 'myfile')
     self.assertEqual(result, self.working_dir + '/' + 'myfile')
Exemplo n.º 8
0
 def test_expand_path_normal(self):
     result = config.expand_path(self.working_dir, "myfile")
     self.assertEqual(result, self.working_dir + "/" + "myfile")