示例#1
0
 def test_with_root_dir_current(self):
     path = "/node/."  # meaning /node/
     self.assertFalse(IDEController.is_valid_path(path))
示例#2
0
 def test_parent_with_root(self):
     path = "/.."
     self.assertFalse(IDEController.is_valid_path(path))
示例#3
0
 def test_with_root_ending_slash_with_spaces(self):
     path = "/node/ "
     self.assertFalse(IDEController.is_valid_path(path))
示例#4
0
 def test_no_root_dir_current_file(self):
     path = "node/./node2"  # meaning /
     self.assertFalse(IDEController.is_valid_path(path))
示例#5
0
 def test_dir_multiple_parent_no_root(self):
     path = "../../.."
     self.assertFalse(IDEController.is_valid_path(path))
示例#6
0
 def test_no_root_ending_slash(self):
     path = "node/"
     self.assertFalse(IDEController.is_valid_path(path))
示例#7
0
 def test_no_root_dir_parent(self):
     path = "node/.."  # meaning /
     self.assertFalse(IDEController.is_valid_path(path))
示例#8
0
 def test_root(self):
     path = "/"
     self.assertFalse(IDEController.is_valid_path(path))
示例#9
0
 def test_file_with_dot_no_root(self):
     path = "node.py"
     self.assertFalse(IDEController.is_valid_path(path))
示例#10
0
 def test_current_no_root(self):
     path = "."
     self.assertFalse(IDEController.is_valid_path(path))
示例#11
0
 def test_empty_string(self):
     path = ""
     self.assertFalse(IDEController.is_valid_path(path))
示例#12
0
 def test_bad_type(self):
     path = 0
     self.assertFalse(IDEController.is_valid_path(path))
示例#13
0
 def test_file_with_dot_with_root_unicode(self):
     path = u"/node.py"
     self.assertTrue(IDEController.is_valid_path(path))
示例#14
0
 def test_file_with_root(self):
     path = "/node"
     self.assertTrue(IDEController.is_valid_path(path))