示例#1
0
def test_valid_filename():
    """ Test Valid FileName """
    with pytest.raises(Exception):
        ui.valid_filename("foo/bar")
    with pytest.raises(Exception):
        ui.valid_filename("..")
    ui.valid_filename("foo")
示例#2
0
def test_valid_filename():
    """ Test Valid FileName """
    with pytest.raises(Exception):
        ui.valid_filename("foo/bar")
    with pytest.raises(Exception):
        ui.valid_filename("..")
    ui.valid_filename("foo")
示例#3
0
文件: test_ui.py 项目: Mhalla/qibuild
def test_valid_filename():
    # pylint:disable-msg=E1101
    with pytest.raises(Exception):
        ui.valid_filename("foo/bar")
    # pylint:disable-msg=E1101
    with pytest.raises(Exception):
        ui.valid_filename("..")
    ui.valid_filename("foo")
示例#4
0
def test_valid_filename():
    # pylint:disable-msg=E1101
    with pytest.raises(Exception):
        ui.valid_filename("foo/bar")
    # pylint:disable-msg=E1101
    with pytest.raises(Exception):
        ui.valid_filename("..")
    ui.valid_filename("foo")
示例#5
0
def test_valid_filename():
    # pylint:disable-msg=E1101
    with pytest.raises(qisys.error.Error):
        ui.valid_filename("foo/bar")
    # pylint:disable-msg=E1101
    with pytest.raises(qisys.error.Error):
        ui.valid_filename("..")
    ui.valid_filename("foo")
示例#6
0
文件: config.py 项目: Grimy/qibuild
 def parse(self, tree):
     name = tree.get("name")
     if not name:
         qisys.qixml.raise_parse_error("'config' node must have a 'name' attribute",
             tree=tree)
     self.name = ui.valid_filename(name)
     self.ide = tree.get("ide")
     env_tree = tree.find("env")
     if env_tree is not None:
         self.env.parse(env_tree)
     cmake_tree = tree.find("cmake")
     if cmake_tree is not None:
         self.cmake.parse(cmake_tree)
     toolchain_elem = tree.find("toolchain")
     if toolchain_elem is not None:
         self.toolchain = toolchain_elem.text
     profiles_tree = tree.find("profiles")
     if profiles_tree is not None:
         profile_elems = profiles_tree.findall("profile")
         for profile_elem in profile_elems:
             self.profiles.append(profile_elem.text)
示例#7
0
 def parse(self, tree):
     name = tree.get("name")
     if not name:
         qisys.qixml.raise_parse_error(
             "'config' node must have a 'name' attribute", tree=tree)
     self.name = ui.valid_filename(name)
     self.ide = tree.get("ide")
     env_tree = tree.find("env")
     if env_tree is not None:
         self.env.parse(env_tree)
     cmake_tree = tree.find("cmake")
     if cmake_tree is not None:
         self.cmake.parse(cmake_tree)
     toolchain_elem = tree.find("toolchain")
     if toolchain_elem is not None:
         self.toolchain = toolchain_elem.text
     profiles_tree = tree.find("profiles")
     if profiles_tree is not None:
         profile_elems = profiles_tree.findall("profile")
         for profile_elem in profile_elems:
             self.profiles.append(profile_elem.text)
示例#8
0
 def name(self, value):
     """ Name Setter """
     ui.valid_filename(value)
     self._name = value
示例#9
0
 def name(self, value):
     ui.valid_filename(value)
     self._name = value
示例#10
0
文件: project.py 项目: Grimy/qibuild
 def name(self, value):
     ui.valid_filename(value)
     self._name = value