Did I find the right examples for you? yes no

All Samples(14)  |  Call(11)  |  Derive(0)  |  Import(3)

src/p/y/python-veracity-0.0.11/veracity/test/test_common.py   python-veracity(Download)
import tempfile
 
from veracity.common import Config, parse_config, find_config, configure_logging
 
from veracity.test import FILES
    def setUpClass(cls):
        cls.config = Config(os.path.join(FILES, 'setup.cfg'))
 
    def test_copy(self):
        """Verify a configuration can be copied."""
        config1 = Config()
    def test_override(self):
        """Verify a configuration options can be overridden."""
        config = Config(os.path.join(FILES, 'setup.cfg'),
                        repos=['r1', 'r2'], series=['s1', 's2'], envs=['e1', 'e2'])
        self.assertEqual(['r1', 'r2'], config.repos)
    def test_no_override(self):
        """Verify a configuration options cannot be overridden with empty items."""
        config = Config(os.path.join(FILES, 'setup.cfg'),
                        repos=[], series=[], envs=[])
        self.assertEqual(['python-veracity-test'], config.repos)

src/p/y/python-veracity-0.0.11/veracity/test/test_poller.py   python-veracity(Download)
from veracity.poller import Poller, run
from veracity.objects import Changeset, Branch
from veracity.common import Config
 
from veracity.test import TEST_REPO, REASON, FILES
    def test_from_config(self):
        """Verify a poller can be created from a config."""
        poller1 = Poller(TEST_REPO.name, Config(series=['N']))
        poller2 = Poller(TEST_REPO.name, Config(series=['N']))
        poller3 = Poller(TEST_REPO.name, Config(series=['C']))

src/p/y/python-veracity-0.0.11/veracity/test/test_builder.py   python-veracity(Download)
 
from veracity.builder import Builder, run
from veracity.common import Config
 
from veracity.test import TEST_REPO, REASON, FILES, log, create_temp_repo, delete_temp_repo
    def test_from_config(self):
        """Verify a poller can be created from a config."""
        builder1 = Builder(TEST_REPO.name, Config(envs=['W']))
        builder2 = Builder(TEST_REPO.name, Config(envs=['W']))
        builder3 = Builder(TEST_REPO.name, Config(envs=['L']))