def test_expand_paths_empty(self): self.assertEqual(expand_path(None), None) self.assertEqual(expand_path(''), '')
def test_expand_paths(self): self.assertEqual(expand_path('$BAR'), 'bar') self.assertEqual(expand_path('~/$BAR'), '/home/foo/bar') self.assertEqual(expand_path('~/$BARn'), '/home/foo/$BARn') self.assertEqual(expand_path('~/${BAR}n'), '/home/foo/barn')
def test_expand_paths(self): assert_equal(expand_path('$BAR'), 'bar') assert_equal(expand_path('~/$BAR'), '/home/foo/bar') assert_equal(expand_path('~/$BARn'), '/home/foo/$BARn') assert_equal(expand_path('~/${BAR}n'), '/home/foo/barn')
def test_expand_paths_empty(self): assert_equal(expand_path(None), None) assert_equal(expand_path(''), '')
def test_expand_paths(self): self.assertEqual(expand_path("$BAR"), "bar") self.assertEqual(expand_path("~/$BAR"), "/home/foo/bar") self.assertEqual(expand_path("~/$BARn"), "/home/foo/$BARn") self.assertEqual(expand_path("~/${BAR}n"), "/home/foo/barn")