Esempio n. 1
0
 def test_should_return_memoized_config_object(self, Config):
     """ Scenario: return memoized config object """
     # Arrange
     # Act
     config1 = get_config()
     config2 = get_config()
     # Assert
     self.assertIsNotNone(config1)
     self.assertEqual(config1, config2)
Esempio n. 2
0
 def test_should_return_memoized_config_object(self, Config):
     """ Scenario: return memoized config object """
     # Arrange
     # Act
     config1 = get_config()
     config2 = get_config()
     # Assert
     assert config1 is not None
     assert config1 == config2
Esempio n. 3
0
 def test_should_return_config_object(self, Config):
     """ Scenario: return config object """
     # Arrange
     # Act
     config = get_config()
     # Assert
     self.assertIsNotNone(config)
Esempio n. 4
0
 def test_should_return_config_object(self, Config):
     """ Scenario: return config object """
     # Arrange
     # Act
     config = get_config()
     # Assert
     assert config is not None
Esempio n. 5
0
def tags(tags_list, config=None):
    """Skip decorated test methods or classes if tags matches.

    Tags are matched to patterns provided by config object.

    :param list tags_list: list of tags for test
    :param morelia.config.Config config: optional configuration object
    """
    if config is None:
        config = get_config()
    pattern = config.get_tags_pattern()
    return unittest.skipIf(should_skip(tags_list, pattern), "Tags not matched")
Esempio n. 6
0
def tags(tags_list, config=None):
    """Skip decorated test methods or classes if tags matches.

    Tags are matched to patterns provided by config object.

    :param list tags_list: list of tags for test
    :param morelia.config.Config config: optional configuration object
    """
    if config is None:
        config = get_config()
    pattern = config.get_tags_pattern()
    return unittest.skipIf(should_skip(tags_list, pattern), "Tags not matched")