How to use the bugwarrior.config function in bugwarrior

To help you get started, we’ve selected a few bugwarrior examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ralphbean / bugwarrior / tests / test_config.py View on Github external
def test_aslist(self):
        self.assertEqual(
            config.aslist('project_bar,project_baz'),
            ['project_bar', 'project_baz']
        )
github ralphbean / bugwarrior / tests / test_config.py View on Github external
def test_asbool(self):
        self.assertEqual(config.asbool('True'), True)
        self.assertEqual(config.asbool('False'), False)
github ralphbean / bugwarrior / tests / test_config.py View on Github external
def test_echo(self):
        self.assertEqual(config.oracle_eval("echo fööbår"), "fööbår")
github ralphbean / bugwarrior / tests / base.py View on Github external
def setUp(self):
        self.old_environ = os.environ.copy()
        self.tempdir = tempfile.mkdtemp(prefix='bugwarrior')

        # Create temporary config files.
        self.taskrc = os.path.join(self.tempdir, '.taskrc')
        self.lists_path = os.path.join(self.tempdir, 'lists')
        os.mkdir(self.lists_path)
        with open(self.taskrc, 'w+') as fout:
            fout.write('data.location=%s\n' % self.lists_path)

        # Configure environment.
        os.environ['HOME'] = self.tempdir
        os.environ.pop(config.BUGWARRIORRC, None)
        os.environ.pop('TASKRC', None)
        os.environ.pop('XDG_CONFIG_HOME', None)
        os.environ.pop('XDG_CONFIG_DIRS', None)
github ralphbean / bugwarrior / tests / test_config.py View on Github external
def test_asint(self):
        self.assertEqual(config.asint(''), None)
        self.assertEqual(config.asint('42'), 42)