Ejemplo n.º 1
0
 def test_addons_in_cur_dir(self):
     runner = CliRunner()
     with working_directory(opj(DATA_DIR, "odoo", "addons")):
         res = runner.invoke(main, ["addons", "--separator", ";", "list"])
         assert res.exit_code == 0
         expected = "addon1;addon2\n"
         assert expected == res.output
Ejemplo n.º 2
0
 def test_list_depends_exclude(self):
     runner = CliRunner()
     with working_directory(DATA_DIR):
         res = runner.invoke(main, ["addons", "list-depends", "--exclude=base"])
         assert res.exit_code == 0
         expected = "\n"
         assert expected == res.output
Ejemplo n.º 3
0
 def test_include(self):
     runner = CliRunner()
     with working_directory(DATA_DIR):
         res = runner.invoke(main, ["addons", "--include", "addon1", "list"])
         assert res.exit_code == 0
         expected = "addon1\n"
         assert expected == res.output
Ejemplo n.º 4
0
 def test_addons_in_cur_dir(self):
     runner = CliRunner()
     with working_directory(opj(DATA_DIR, "odoo", "addons")):
         res = runner.invoke(main, ["addons", "--separator", ";", "list"])
         assert res.exit_code == 0
         expected = "addon1;addon2\n"
         assert expected == res.output
Ejemplo n.º 5
0
 def test_list_depends(self):
     runner = CliRunner()
     with working_directory(DATA_DIR):
         res = runner.invoke(main, ["addons", "list-depends"])
         assert res.exit_code == 0
         expected = "base\n"
         assert expected == res.output
Ejemplo n.º 6
0
 def test3_config(self):
     runner = CliRunner()
     with working_directory(DATA_DIR):
         res = runner.invoke(
             main, ["-c", os.path.join(DATA_DIR, "test_pylint3.cfg"), "pylint"]
         )
         self.assertTrue(res.exit_code != 0)
         assert "fixme: " not in res.output
Ejemplo n.º 7
0
 def test_include(self):
     runner = CliRunner()
     with working_directory(DATA_DIR):
         res = runner.invoke(main,
                             ["addons", "--include", "addon1", "list"])
         assert res.exit_code == 0
         expected = "addon1\n"
         assert expected == res.output
Ejemplo n.º 8
0
 def test_list(self):
     runner = CliRunner()
     with working_directory(DATA_DIR):
         res = runner.invoke(main, [
             'addons',
             'list',
         ])
         assert res.exit_code == 0
         expected = 'addon1,addon2\n'
         assert expected == res.output
Ejemplo n.º 9
0
 def test3_config(self):
     runner = CliRunner()
     with working_directory(DATA_DIR):
         res = runner.invoke(main, [
             '-c',
             os.path.join(DATA_DIR, 'test_pylint3.cfg'),
             'pylint',
         ])
         self.assertTrue(res.exit_code != 0)
         assert 'fixme: ' not in res.output
Ejemplo n.º 10
0
 def test3(self):
     runner = CliRunner()
     with working_directory(DATA_DIR):
         res = runner.invoke(pylintcmd, [
             '--',
             '-d',
             'fixme',
         ])
         self.assertTrue(res.exit_code != 0)
         assert 'fixme: ' not in res.output
Ejemplo n.º 11
0
 def test_list_depends_exclude(self):
     runner = CliRunner()
     with working_directory(DATA_DIR):
         res = runner.invoke(main, [
             'addons',
             'list-depends',
             '--exclude=base',
         ])
         assert res.exit_code == 0
         expected = '\n'
         assert expected == res.output
Ejemplo n.º 12
0
 def test_addons_in_cur_dir(self):
     runner = CliRunner()
     with working_directory(opj(DATA_DIR, 'odoo', 'addons')):
         res = runner.invoke(main, [
             'addons',
             '--separator',
             ';',
             'list',
         ])
         assert res.exit_code == 0
         expected = 'addon1;addon2\n'
         assert expected == res.output
Ejemplo n.º 13
0
 def test2(self):
     runner = CliRunner()
     with working_directory(DATA_DIR):
         res = runner.invoke(pylintcmd, ["-e", "fixme:0,manifest-required-key"])
         self.assertTrue(res.exit_code != 0)
         expected = dedent(
             """\
             messages that did not cause failure:
               manifest-required-key: 1
             messages that caused failure:
               fixme: 1 (expected 0)
         """
         )
         assert expected in res.output
Ejemplo n.º 14
0
 def test2_config(self):
     runner = CliRunner()
     with working_directory(DATA_DIR):
         res = runner.invoke(
             main, ["-c", os.path.join(DATA_DIR, "test_pylint2.cfg"), "pylint"]
         )
         self.assertTrue(res.exit_code != 0)
         expected = dedent(
             """\
             messages that did not cause failure:
               manifest-required-key: 1
             messages that caused failure:
               fixme: 1 (expected 0)
         """
         )
         assert expected in res.output
Ejemplo n.º 15
0
 def test3(self):
     runner = CliRunner()
     with working_directory(DATA_DIR):
         res = runner.invoke(pylintcmd, ["--", "-d", "fixme"])
         self.assertTrue(res.exit_code != 0)
         assert "fixme: " not in res.output