Ejemplo n.º 1
0
    def test_tag_custom_pattern(self, workspace):
        config = Config({'file': 'fake.py', 'vcs': 'fake', 'tag_format': 'v{version}'})
        releaser = Releaser(config)

        with patch.object(releaser, 'vcs') as vcs:
            releaser.tag()
            vcs.tag.assert_called_with('v{0}'.format(releaser.version))
Ejemplo n.º 2
0
    def test_tag_no_tag(self, workspace):
        config = Config({'file': 'fake.py', 'vcs': 'fake', 'tag': False})
        releaser = Releaser(config)

        with patch.object(releaser, 'vcs') as vcs:
            releaser.tag()
            assert not vcs.tag.called
Ejemplo n.º 3
0
    def test_tag(self, workspace):
        config = Config({'file': 'fake.py', 'vcs': 'fake'})
        releaser = Releaser(config)

        with patch.object(releaser, 'vcs') as vcs:
            releaser.tag()
            vcs.tag.assert_called_with(str(releaser.version))
Ejemplo n.º 4
0
def test_tag_custom_pattern(workspace, mocker):
    config = Config({'file': 'fake.py', 'vcs': 'fake', 'tag_format': 'v{version}'})
    releaser = Releaser(config)
    vcs = mocker.patch.object(releaser, 'vcs')

    releaser.tag()

    vcs.tag.assert_called_with('v{0}'.format(releaser.version))
Ejemplo n.º 5
0
def test_tag_no_tag(workspace, mocker):
    config = Config({'file': 'fake.py', 'vcs': 'fake', 'tag': False})
    releaser = Releaser(config)
    vcs = mocker.patch.object(releaser, 'vcs')

    releaser.tag()

    assert not vcs.tag.called
Ejemplo n.º 6
0
def test_tag(workspace, mocker):
    config = Config({'file': 'fake.py', 'vcs': 'fake'})
    releaser = Releaser(config)
    vcs = mocker.patch.object(releaser, 'vcs')

    releaser.tag()

    vcs.tag.assert_called_with(str(releaser.version))
Ejemplo n.º 7
0
    def test_tag(self):
        config = Config({'file': 'fake.py', 'vcs': 'fake'})
        with workspace('fake') as wksp:
            releaser = Releaser(config)

        with patch.object(releaser, 'vcs') as vcs:
            releaser.tag()
            vcs.tag.assert_called_with(str(releaser.version))
Ejemplo n.º 8
0
def test_tag_no_tag(workspace, mocker):
    config = Config({"file": "fake.py", "vcs": "fake", "tag": False})
    releaser = Releaser(config)
    vcs = mocker.patch.object(releaser, "vcs")

    releaser.tag()

    assert not vcs.tag.called
Ejemplo n.º 9
0
def test_tag(workspace, mocker):
    config = Config({"file": "fake.py", "vcs": "fake"})
    releaser = Releaser(config)
    vcs = mocker.patch.object(releaser, "vcs")

    releaser.tag()

    vcs.tag.assert_called_with(str(releaser.version))
Ejemplo n.º 10
0
def test_tag_custom_pattern(workspace, mocker):
    config = Config({
        "file": "fake.py",
        "vcs": "fake",
        "tag_format": "v{version}"
    })
    releaser = Releaser(config)
    vcs = mocker.patch.object(releaser, "vcs")

    releaser.tag()

    vcs.tag.assert_called_with("v{0}".format(releaser.version))