Exemplo n.º 1
0
    def test_convert(self):
        self.top_node.make_node("setup.py").write("""\
from distutils.core import setup

setup(name="foo")
""")
        main(["convert"])
        n = self.top_node.find_node("bento.info")
        r_bento = """\
Name: foo
Version: 0.0.0
Summary: UNKNOWN
Url: UNKNOWN
DownloadUrl: UNKNOWN
Description: UNKNOWN
Author: UNKNOWN
AuthorEmail: UNKNOWN
Maintainer: UNKNOWN
MaintainerEmail: UNKNOWN
License: UNKNOWN
Platforms: UNKNOWN

ExtraSourceFiles:
    setup.py
"""
        self.assertEqual(n.read(), r_bento)
Exemplo n.º 2
0
    def test_convert(self):
        self.top_node.make_node("setup.py").write("""\
from distutils.core import setup

setup(name="foo")
""")
        main(["convert"])
        n = self.top_node.find_node("bento.info")
        r_bento = """\
Name: foo
Version: 0.0.0
Summary: UNKNOWN
Url: UNKNOWN
DownloadUrl: UNKNOWN
Description: UNKNOWN
Author: UNKNOWN
AuthorEmail: UNKNOWN
Maintainer: UNKNOWN
MaintainerEmail: UNKNOWN
License: UNKNOWN
Platforms: UNKNOWN

ExtraSourceFiles:
    setup.py
"""
        self.assertEqual(n.read(), r_bento)
Exemplo n.º 3
0
    def test_in_sub_directory(self):
        bento_info = """\
Name: foo
"""
        self.top_node.make_node("bento.info").write(bento_info)

        subdir_node = self.top_node.make_node("subdir")
        subdir_node.mkdir()

        try:
            os.chdir(subdir_node.abspath())
            self.assertRaises(UsageException, lambda: main(["--bento-info=../bento.info", "configure"]))
        finally:
            os.chdir(self.top_node.abspath())
Exemplo n.º 4
0
    def test_in_sub_directory(self):
        bento_info = """\
Name: foo
"""
        self.top_node.make_node("bento.info").write(bento_info)

        subdir_node = self.top_node.make_node("subdir")
        subdir_node.mkdir()

        try:
            os.chdir(subdir_node.abspath())
            self.assertRaises(
                UsageException,
                lambda: main(["--bento-info=../bento.info", "configure"]))
        finally:
            os.chdir(self.top_node.abspath())
Exemplo n.º 5
0
 def test_help_commands(self):
     main(["help", "commands"])
Exemplo n.º 6
0
 def test_mpkg(self):
     main(["build_mpkg"])
Exemplo n.º 7
0
 def test_build_egg(self):
     main(["build_egg"])
Exemplo n.º 8
0
 def test_install(self):
     main(["install"])
Exemplo n.º 9
0
 def test_configure(self):
     main(["configure"])
Exemplo n.º 10
0
 def test_help_non_existing_command(self):
     self.assertRaises(UsageException, lambda: main(["help", "floupi"]))
Exemplo n.º 11
0
 def test_mpkg(self):
     main(["build_mpkg"])
Exemplo n.º 12
0
 def test_wininst(self):
     main(["build_wininst"])
Exemplo n.º 13
0
 def test_build_egg(self):
     main(["build_egg"])
Exemplo n.º 14
0
 def test_sdist(self):
     main(["sdist"])
Exemplo n.º 15
0
 def test_install(self):
     main(["install"])
Exemplo n.º 16
0
 def test_global_options_full_version(self):
     main(["--full-version"])
Exemplo n.º 17
0
 def test_command_help(self):
     main(["configure", "--help"])
Exemplo n.º 18
0
 def test_help_globals(self):
     main(["help", "globals"])
Exemplo n.º 19
0
 def test_build(self):
     main(["build"])
Exemplo n.º 20
0
 def test_help_commands(self):
     main(["help", "commands"])
Exemplo n.º 21
0
 def test_build(self):
     main(["build"])
Exemplo n.º 22
0
 def test_global_options_version(self):
     main(["--version"])
Exemplo n.º 23
0
 def test_sdist(self):
     main(["sdist"])
Exemplo n.º 24
0
 def test_global_options_full_version(self):
     main(["--full-version"])
Exemplo n.º 25
0
 def test_wininst(self):
     main(["build_wininst"])
Exemplo n.º 26
0
 def test_usage(self):
     main(["--help"])
Exemplo n.º 27
0
 def test_command_help(self):
     main(["configure", "--help"])
Exemplo n.º 28
0
 def test_no_bento(self):
     main([])
Exemplo n.º 29
0
 def test_help_globals(self):
     main(["help", "globals"])
Exemplo n.º 30
0
 def test_help_non_existing_command(self):
     self.assertRaises(UsageException, lambda: main(["help", "floupi"]))
Exemplo n.º 31
0
 def test_global_options_version(self):
     main(["--version"])
Exemplo n.º 32
0
    def test_configure_help(self):
        bento_info = """\
Name: foo
"""
        self.top_node.make_node("bento.info").write(bento_info)
        main(["configure", "--help"])
Exemplo n.º 33
0
 def test_usage(self):
     main(["--help"])
Exemplo n.º 34
0
    def test_help_command(self):
        bento_info = """\
Name: foo
"""
        self.top_node.make_node("bento.info").write(bento_info)
        main(["help", "configure"])
Exemplo n.º 35
0
 def test_no_bento(self):
     main([])
Exemplo n.º 36
0
    def test_help_command(self):
        bento_info = """\
Name: foo
"""
        self.top_node.make_node("bento.info").write(bento_info)
        main(["help", "configure"])
Exemplo n.º 37
0
    def test_configure_help(self):
        bento_info = """\
Name: foo
"""
        self.top_node.make_node("bento.info").write(bento_info)
        main(["configure", "--help"])
Exemplo n.º 38
0
 def test_configure(self):
     main(["configure"])