示例#1
0
文件: test.py 项目: agavrel/ls_python
 def test_with_absolute_path(self):
     argv = ["/home"]
     self.assertEqual(my_ls(argv), original_ls(argv))
示例#2
0
文件: test.py 项目: agavrel/ls_python
 def test_ls_with_star(self):
     argv = glob.glob("*")
     self.assertEqual(
         my_ls(argv), original_ls(argv)
     )  # we are currently only handling files so it will have the same behavior
示例#3
0
文件: test.py 项目: agavrel/ls_python
 def test_with_l_flag(self):
     argv = ["-l"]
     self.assertEqual(my_ls(argv), original_ls(argv))
示例#4
0
文件: test.py 项目: agavrel/ls_python
 def test_ls_with_file_extension(self):
     argv = glob.glob("*.py")
     self.assertEqual(my_ls(argv), original_ls(argv))
示例#5
0
文件: test.py 项目: agavrel/ls_python
 def test_existing_file_start_with(self):
     argv = glob.glob("ls*")
     self.assertEqual(my_ls(argv), original_ls(argv))
示例#6
0
文件: test.py 项目: agavrel/ls_python
 def test_existing_file(self):
     argv = ["ls.py"]
     self.assertEqual(my_ls(argv), original_ls(argv))
示例#7
0
文件: test.py 项目: agavrel/ls_python
 def test_non_existing_file(self):
     argv = ["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_does_not_exists.txt"]
     self.assertEqual(my_ls(argv), original_ls(argv))
示例#8
0
文件: test.py 项目: agavrel/ls_python
 def test_ls(self):
     argv = [""]
     self.assertEqual(my_ls(argv), original_ls(argv))