def test_with_absolute_path(self): argv = ["/home"] self.assertEqual(my_ls(argv), original_ls(argv))
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
def test_with_l_flag(self): argv = ["-l"] self.assertEqual(my_ls(argv), original_ls(argv))
def test_ls_with_file_extension(self): argv = glob.glob("*.py") self.assertEqual(my_ls(argv), original_ls(argv))
def test_existing_file_start_with(self): argv = glob.glob("ls*") self.assertEqual(my_ls(argv), original_ls(argv))
def test_existing_file(self): argv = ["ls.py"] self.assertEqual(my_ls(argv), original_ls(argv))
def test_non_existing_file(self): argv = ["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_does_not_exists.txt"] self.assertEqual(my_ls(argv), original_ls(argv))
def test_ls(self): argv = [""] self.assertEqual(my_ls(argv), original_ls(argv))