Example #1
0
def run(args=[]):
    """
    It will throw subprocess.CalledProcessError if something goes wrong.
    """
    args = ["python", os.path.join(C.selfdir(), "..", "cli.py")] + args
    devnull = open('/dev/null', 'w')

    subprocess.check_call(args, stdout=devnull, stderr=devnull)
Example #2
0
def run(args=[]):
    """
    It will throw subprocess.CalledProcessError if something goes wrong.
    """
    args = ["python", os.path.join(C.selfdir(), "..", "cli.py")] + args
    devnull = open('/dev/null', 'w')

    subprocess.check_call(args, stdout=devnull, stderr=devnull)
Example #3
0
    def test_74_multi_inputs__w_template(self):
        if not anyconfig.template.SUPPORTED:
            return

        curdir = C.selfdir()

        infile = os.path.join(curdir, "*template-c*.yml")
        output = os.path.join(self.workdir, "output.yml")

        TT.main(["dummy", "--template", "-o", output, infile])
Example #4
0
 def setUp(self):
     self.workdir = C.setup_workdir()
     self.script = os.path.join(C.selfdir(), "..", "cli.py")
Example #5
0
 def setUp(self):
     self.workdir = C.setup_workdir()
     self.script = os.path.join(C.selfdir(), "..", "cli.py")
Example #6
0
# License: MIT
#
# pylint: disable=missing-docstring, invalid-name, too-many-public-methods
import os
import os.path
import unittest

import anyconfig.cli as TT
import anyconfig.api as A
import anyconfig.template
import anyconfig.tests.common as C

from anyconfig.tests.common import CNF_0


CNF_0_PATH = os.path.join(C.selfdir(), "00-cnf.yml")
SCM_0_PATH = os.path.join(C.selfdir(), "00-scm.yml")


def _run(*args):
    TT.main(["dummy"] + list(args))


class Test(unittest.TestCase):
    def setUp(self):
        self.workdir = C.setup_workdir()
        self.script = os.path.join(C.selfdir(), "..", "cli.py")

    def tearDown(self):
        C.cleanup_workdir(self.workdir)