def bump_version(): module_name, dry_run, new_version = config.common_arguments() attributes.replace_attribute( module_name, '__version__', new_version, dry_run=dry_run)
def test_replace_attribute_dry_run(python_module): attributes.replace_attribute('test_app', '__version__', '1.0.0', dry_run=True) expected_content = list(context.initial_init_content) assert '\n'.join(expected_content) == ''.join( open(context.tmp_file).readlines())
def increment_version(context): """Increments the __version__ attribute of your module's __init__.""" attributes.replace_attribute(context.module_name, '__version__', context.new_version, dry_run=context.dry_run) log.info('Bumped version from %s to %s' % (context.current_version, context.new_version))
def increment_version(context): """Increments the __version__ attribute of your module's __init__.""" attributes.replace_attribute( context.module_name, '__version__', context.new_version, dry_run=context.dry_run) log.info('Bumped version from %s to %s' % (context.current_version, context.new_version))
def test_replace_attribute_dry_run(): attributes.replace_attribute( 'test_app', '__version__', '1.0.0', dry_run=True ) expected_content = list(context.initial_init_content) assert '\n'.join(expected_content) == ''.join(open(context.tmp_file).readlines())
def test_replace_attribute_dry_run(self): attributes.replace_attribute('test_app', '__version__', '1.0.0', dry_run=True) expected_content = list(self.initial_init_content) self.assertEquals('\n'.join(expected_content), ''.join(open(self.tmp_file).readlines()))
def test_replace_attribute(): attributes.replace_attribute('test_app', '__version__', '1.0.0', dry_run=False) expected_content = list(context.initial_init_content) expected_content[2] = "__version__ = '1.0.0'" assert '\n'.join(expected_content) == ''.join( open(context.tmp_file).readlines())
def test_replace_attribute_dry_run(self): attributes.replace_attribute( 'test_app', '__version__', '1.0.0', dry_run=True ) expected_content = list(self.initial_init_content) self.assertEquals( '\n'.join(expected_content), ''.join( open(self.tmp_file).readlines() ) )
def test_replace_attribute(python_module): attributes.replace_attribute('test_app', '__version__', '1.0.0', dry_run=False) expected_content = list(context.initial_init_content) expected_content[2] = "__version__ = '1.0.0'" assert '\n'.join(expected_content) == ''.join(open(context.tmp_file).readlines())