示例#1
0
def test_should_back_up():
    """
    Tests our db backup logic: skip for dev versions, and backup on change
    """
    assert cli.should_back_up("0.10.0", "0.10.1")
    assert not cli.should_back_up("0.10.0", "0.10.0")
    assert not cli.should_back_up("0.10.0-dev0", "0.10.0")
    assert not cli.should_back_up("0.10.0", "0.10.0-dev0")
    assert not cli.should_back_up("0.10.0-dev0", "0.10.0-dev0")
示例#2
0
def test_version_updated():
    """
    Tests our db backup logic: version_updated gets any change, backup gets only non-dev changes
    """
    assert cli.version_updated("0.10.0", "0.10.1")
    assert not cli.version_updated("0.10.0", "0.10.0")
    assert not cli.should_back_up("0.10.0-dev0", "")
    assert not cli.should_back_up("0.10.0-dev0", "0.10.0")
    assert not cli.should_back_up("0.10.0", "0.10.0-dev0")
    assert not cli.should_back_up("0.10.0-dev0", "0.10.0-dev0")