Exemple #1
0
    def test_prepare_with_version(self):
        self.releaser.config[ReplaceHook.key] = {
            'dev': 'dev-{version}',
            'stable': 'stable-{tag}',
        }

        replacements = []
        hook = ReplaceHook(self.releaser)
        hook.prepare(replacements)

        assert replacements == [('stable-v1.2.3', 'dev-1.2.4.dev')]
Exemple #2
0
    def test_bump(self):
        self.releaser.config[ReplaceHook.key] = {
            'dev': 'dev-{version}',
            'stable': 'stable-{tag}',
        }

        replacements = []
        hook = ReplaceHook(self.releaser)
        hook.bump(replacements)

        assert replacements == [('dev-1.2.3.dev', 'stable-v1.2.3')]
Exemple #3
0
    def test_prepare_with_version(self):
        self.releaser.config[ReplaceHook.key] = {
            "dev": "dev-{version}",
            "stable": "stable-{tag}",
        }

        replacements = []
        hook = ReplaceHook(self.releaser)
        hook.prepare(replacements)

        assert replacements == [("stable-v1.2.3", "dev-1.2.4.dev")]
Exemple #4
0
    def test_bump(self):
        self.releaser.config[ReplaceHook.key] = {
            "dev": "dev-{version}",
            "stable": "stable-{tag}",
        }

        replacements = []
        hook = ReplaceHook(self.releaser)
        hook.bump(replacements)

        assert replacements == [("dev-1.2.3.dev", "stable-v1.2.3")]
Exemple #5
0
    def test_prepare_with_version(self):
        self.releaser.config[ReplaceHook.key] = {
            'dev': 'dev-{version}',
            'stable': 'stable-{tag}',
        }

        replacements = []
        hook = ReplaceHook(self.releaser)
        hook.prepare(replacements)

        assert replacements == [('stable-v1.2.3', 'dev-1.2.4.dev')]
Exemple #6
0
    def test_bump(self):
        self.releaser.config[ReplaceHook.key] = {
            'dev': 'dev-{version}',
            'stable': 'stable-{tag}',
        }

        replacements = []
        hook = ReplaceHook(self.releaser)
        hook.bump(replacements)

        assert replacements == [('dev-1.2.3.dev', 'stable-v1.2.3')]