コード例 #1
0
ファイル: tests.py プロジェクト: tartley/filtercwd
 def test_untouched(self):
     self.assertEqual(
         transform('/other', '/cwd', '/home'),
         '/other'
     )
コード例 #2
0
ファイル: tests.py プロジェクト: tartley/filtercwd
 def test_prefer_cwd(self):
     self.assertEqual(
         transform('/home/sub', '/home', '/home'),
         './sub'
     )
コード例 #3
0
ファイル: tests.py プロジェクト: tartley/filtercwd
 def test_home_is_inside_cwd(self):
     self.assertEqual(
         transform('/home/mine/sub', '/home', '/home/mine'),
         '~/sub'
     )
コード例 #4
0
ファイル: tests.py プロジェクト: tartley/filtercwd
 def test_cwd_is_inside_home(self):
     self.assertEqual(
         transform('/home/one/two', '/home/one', '/home'),
         './two'
     )
コード例 #5
0
ファイル: tests.py プロジェクト: tartley/filtercwd
 def test_home(self):
     self.assertEqual(
         transform('/home/sub', '/cwd', '/home'),
         '~/sub'
     )
コード例 #6
0
ファイル: tests.py プロジェクト: tartley/filtercwd
 def test_cwd(self):
     self.assertEqual(
         transform('/cwd/sub', '/cwd', '/home'),
         './sub'
     )