Beispiel #1
0
 def test_getcfg_and_config(self, testdir, tmpdir, section, filename):
     sub = tmpdir.mkdir("sub")
     sub.chdir()
     tmpdir.join(filename).write(
         textwrap.dedent("""\
             [{section}]
             name = value
             """.format(section=section)))
     _, _, cfg = getcfg([sub])
     assert cfg["name"] == "value"
     config = testdir.parseconfigure(sub)
     assert config.inicfg["name"] == "value"
Beispiel #2
0
 def test_getcfg_and_config(self, testdir, tmpdir, section, filename):
     sub = tmpdir.mkdir("sub")
     sub.chdir()
     tmpdir.join(filename).write(
         _pytest._code.Source("""
         [{section}]
         name = value
     """.format(section=section)))
     rootdir, inifile, cfg = getcfg([sub])
     assert cfg["name"] == "value"
     config = testdir.parseconfigure(sub)
     assert config.inicfg["name"] == "value"
Beispiel #3
0
 def test_getcfg_and_config(self, testdir, tmpdir, section, filename):
     sub = tmpdir.mkdir("sub")
     sub.chdir()
     tmpdir.join(filename).write(
         _pytest._code.Source(
             """
         [{section}]
         name = value
     """.format(
                 section=section
             )
         )
     )
     rootdir, inifile, cfg = getcfg([sub])
     assert cfg["name"] == "value"
     config = testdir.parseconfigure(sub)
     assert config.inicfg["name"] == "value"
Beispiel #4
0
 def test_getcfg_empty_path(self):
     """correctly handle zero length arguments (a la pytest '')"""
     getcfg([""])
Beispiel #5
0
 def test_getcfg_empty_path(self):
     """correctly handle zero length arguments (a la pytest '')"""
     getcfg([""])