Beispiel #1
0
 def test_expanduser(self):
     cl = self.klass(log=log)
     argv = ['--a=~/1/2/3', '--b=~', '--c=~/', '--d="~/"']
     config = cl.load_config(argv)
     u = Unicode()
     self.assertEqual(u.from_string(config.a), os.path.expanduser('~/1/2/3'))
     self.assertEqual(u.from_string(config.b), os.path.expanduser('~'))
     self.assertEqual(u.from_string(config.c), os.path.expanduser('~/'))
     self.assertEqual(u.from_string(config.d), '~/')