How to use the pypuppetdb.utils.versioncmp function in pypuppetdb

To help you get started, we’ve selected a few pypuppetdb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github voxpupuli / pypuppetdb / tests / test_utils.py View on Github external
def test_versioncmp(self):
        assert pypuppetdb.utils.versioncmp('1', '1') == 0
        assert pypuppetdb.utils.versioncmp('2.1', '2.2') < 0
        assert pypuppetdb.utils.versioncmp('3.0.4.10', '3.0.4.2') > 0
        assert pypuppetdb.utils.versioncmp('4.08', '4.08.1') < 0
        assert pypuppetdb.utils.versioncmp('3.2.1.9.8144', '3.2') > 0
        assert pypuppetdb.utils.versioncmp('3.2', '3.2.1.9.8144') < 0
        assert pypuppetdb.utils.versioncmp('1.2', '2.1') < 0
        assert pypuppetdb.utils.versioncmp('2.1', '1.2') > 0
        assert pypuppetdb.utils.versioncmp('5.6.7', '5.6.7') == 0
        assert pypuppetdb.utils.versioncmp('1.01.1', '1.1.1') == 0
        assert pypuppetdb.utils.versioncmp('1.1.1', '1.01.1') == 0
        assert pypuppetdb.utils.versioncmp('1', '1.0') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1.0.1') < 0
        assert pypuppetdb.utils.versioncmp('1.0.1', '1.0') > 0
        assert pypuppetdb.utils.versioncmp('1.0.2.0', '1.0.2') == 0
github voxpupuli / pypuppetdb / tests / test_utils.py View on Github external
def test_versioncmp(self):
        assert pypuppetdb.utils.versioncmp('1', '1') == 0
        assert pypuppetdb.utils.versioncmp('2.1', '2.2') < 0
        assert pypuppetdb.utils.versioncmp('3.0.4.10', '3.0.4.2') > 0
        assert pypuppetdb.utils.versioncmp('4.08', '4.08.1') < 0
        assert pypuppetdb.utils.versioncmp('3.2.1.9.8144', '3.2') > 0
        assert pypuppetdb.utils.versioncmp('3.2', '3.2.1.9.8144') < 0
        assert pypuppetdb.utils.versioncmp('1.2', '2.1') < 0
        assert pypuppetdb.utils.versioncmp('2.1', '1.2') > 0
        assert pypuppetdb.utils.versioncmp('5.6.7', '5.6.7') == 0
        assert pypuppetdb.utils.versioncmp('1.01.1', '1.1.1') == 0
        assert pypuppetdb.utils.versioncmp('1.1.1', '1.01.1') == 0
        assert pypuppetdb.utils.versioncmp('1', '1.0') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1.0.1') < 0
        assert pypuppetdb.utils.versioncmp('1.0.1', '1.0') > 0
        assert pypuppetdb.utils.versioncmp('1.0.2.0', '1.0.2') == 0
github voxpupuli / pypuppetdb / tests / test_utils.py View on Github external
def test_versioncmp(self):
        assert pypuppetdb.utils.versioncmp('1', '1') == 0
        assert pypuppetdb.utils.versioncmp('2.1', '2.2') < 0
        assert pypuppetdb.utils.versioncmp('3.0.4.10', '3.0.4.2') > 0
        assert pypuppetdb.utils.versioncmp('4.08', '4.08.1') < 0
        assert pypuppetdb.utils.versioncmp('3.2.1.9.8144', '3.2') > 0
        assert pypuppetdb.utils.versioncmp('3.2', '3.2.1.9.8144') < 0
        assert pypuppetdb.utils.versioncmp('1.2', '2.1') < 0
        assert pypuppetdb.utils.versioncmp('2.1', '1.2') > 0
        assert pypuppetdb.utils.versioncmp('5.6.7', '5.6.7') == 0
        assert pypuppetdb.utils.versioncmp('1.01.1', '1.1.1') == 0
        assert pypuppetdb.utils.versioncmp('1.1.1', '1.01.1') == 0
        assert pypuppetdb.utils.versioncmp('1', '1.0') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1.0.1') < 0
        assert pypuppetdb.utils.versioncmp('1.0.1', '1.0') > 0
        assert pypuppetdb.utils.versioncmp('1.0.2.0', '1.0.2') == 0
github voxpupuli / pypuppetdb / tests / test_utils.py View on Github external
def test_versioncmp(self):
        assert pypuppetdb.utils.versioncmp('1', '1') == 0
        assert pypuppetdb.utils.versioncmp('2.1', '2.2') < 0
        assert pypuppetdb.utils.versioncmp('3.0.4.10', '3.0.4.2') > 0
        assert pypuppetdb.utils.versioncmp('4.08', '4.08.1') < 0
        assert pypuppetdb.utils.versioncmp('3.2.1.9.8144', '3.2') > 0
        assert pypuppetdb.utils.versioncmp('3.2', '3.2.1.9.8144') < 0
        assert pypuppetdb.utils.versioncmp('1.2', '2.1') < 0
        assert pypuppetdb.utils.versioncmp('2.1', '1.2') > 0
        assert pypuppetdb.utils.versioncmp('5.6.7', '5.6.7') == 0
        assert pypuppetdb.utils.versioncmp('1.01.1', '1.1.1') == 0
        assert pypuppetdb.utils.versioncmp('1.1.1', '1.01.1') == 0
        assert pypuppetdb.utils.versioncmp('1', '1.0') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1.0.1') < 0
        assert pypuppetdb.utils.versioncmp('1.0.1', '1.0') > 0
        assert pypuppetdb.utils.versioncmp('1.0.2.0', '1.0.2') == 0
github voxpupuli / pypuppetdb / tests / test_utils.py View on Github external
def test_versioncmp(self):
        assert pypuppetdb.utils.versioncmp('1', '1') == 0
        assert pypuppetdb.utils.versioncmp('2.1', '2.2') < 0
        assert pypuppetdb.utils.versioncmp('3.0.4.10', '3.0.4.2') > 0
        assert pypuppetdb.utils.versioncmp('4.08', '4.08.1') < 0
        assert pypuppetdb.utils.versioncmp('3.2.1.9.8144', '3.2') > 0
        assert pypuppetdb.utils.versioncmp('3.2', '3.2.1.9.8144') < 0
        assert pypuppetdb.utils.versioncmp('1.2', '2.1') < 0
        assert pypuppetdb.utils.versioncmp('2.1', '1.2') > 0
        assert pypuppetdb.utils.versioncmp('5.6.7', '5.6.7') == 0
        assert pypuppetdb.utils.versioncmp('1.01.1', '1.1.1') == 0
        assert pypuppetdb.utils.versioncmp('1.1.1', '1.01.1') == 0
        assert pypuppetdb.utils.versioncmp('1', '1.0') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1.0.1') < 0
        assert pypuppetdb.utils.versioncmp('1.0.1', '1.0') > 0
        assert pypuppetdb.utils.versioncmp('1.0.2.0', '1.0.2') == 0
github voxpupuli / pypuppetdb / tests / test_utils.py View on Github external
def test_versioncmp(self):
        assert pypuppetdb.utils.versioncmp('1', '1') == 0
        assert pypuppetdb.utils.versioncmp('2.1', '2.2') < 0
        assert pypuppetdb.utils.versioncmp('3.0.4.10', '3.0.4.2') > 0
        assert pypuppetdb.utils.versioncmp('4.08', '4.08.1') < 0
        assert pypuppetdb.utils.versioncmp('3.2.1.9.8144', '3.2') > 0
        assert pypuppetdb.utils.versioncmp('3.2', '3.2.1.9.8144') < 0
        assert pypuppetdb.utils.versioncmp('1.2', '2.1') < 0
        assert pypuppetdb.utils.versioncmp('2.1', '1.2') > 0
        assert pypuppetdb.utils.versioncmp('5.6.7', '5.6.7') == 0
        assert pypuppetdb.utils.versioncmp('1.01.1', '1.1.1') == 0
        assert pypuppetdb.utils.versioncmp('1.1.1', '1.01.1') == 0
        assert pypuppetdb.utils.versioncmp('1', '1.0') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1.0.1') < 0
        assert pypuppetdb.utils.versioncmp('1.0.1', '1.0') > 0
        assert pypuppetdb.utils.versioncmp('1.0.2.0', '1.0.2') == 0
github voxpupuli / pypuppetdb / tests / test_utils.py View on Github external
assert pypuppetdb.utils.versioncmp('1', '1') == 0
        assert pypuppetdb.utils.versioncmp('2.1', '2.2') < 0
        assert pypuppetdb.utils.versioncmp('3.0.4.10', '3.0.4.2') > 0
        assert pypuppetdb.utils.versioncmp('4.08', '4.08.1') < 0
        assert pypuppetdb.utils.versioncmp('3.2.1.9.8144', '3.2') > 0
        assert pypuppetdb.utils.versioncmp('3.2', '3.2.1.9.8144') < 0
        assert pypuppetdb.utils.versioncmp('1.2', '2.1') < 0
        assert pypuppetdb.utils.versioncmp('2.1', '1.2') > 0
        assert pypuppetdb.utils.versioncmp('5.6.7', '5.6.7') == 0
        assert pypuppetdb.utils.versioncmp('1.01.1', '1.1.1') == 0
        assert pypuppetdb.utils.versioncmp('1.1.1', '1.01.1') == 0
        assert pypuppetdb.utils.versioncmp('1', '1.0') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1.0.1') < 0
        assert pypuppetdb.utils.versioncmp('1.0.1', '1.0') > 0
        assert pypuppetdb.utils.versioncmp('1.0.2.0', '1.0.2') == 0
github voxpupuli / pypuppetdb / tests / test_utils.py View on Github external
def test_versioncmp(self):
        assert pypuppetdb.utils.versioncmp('1', '1') == 0
        assert pypuppetdb.utils.versioncmp('2.1', '2.2') < 0
        assert pypuppetdb.utils.versioncmp('3.0.4.10', '3.0.4.2') > 0
        assert pypuppetdb.utils.versioncmp('4.08', '4.08.1') < 0
        assert pypuppetdb.utils.versioncmp('3.2.1.9.8144', '3.2') > 0
        assert pypuppetdb.utils.versioncmp('3.2', '3.2.1.9.8144') < 0
        assert pypuppetdb.utils.versioncmp('1.2', '2.1') < 0
        assert pypuppetdb.utils.versioncmp('2.1', '1.2') > 0
        assert pypuppetdb.utils.versioncmp('5.6.7', '5.6.7') == 0
        assert pypuppetdb.utils.versioncmp('1.01.1', '1.1.1') == 0
        assert pypuppetdb.utils.versioncmp('1.1.1', '1.01.1') == 0
        assert pypuppetdb.utils.versioncmp('1', '1.0') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1.0.1') < 0
        assert pypuppetdb.utils.versioncmp('1.0.1', '1.0') > 0
        assert pypuppetdb.utils.versioncmp('1.0.2.0', '1.0.2') == 0
github voxpupuli / pypuppetdb / tests / test_utils.py View on Github external
def test_versioncmp(self):
        assert pypuppetdb.utils.versioncmp('1', '1') == 0
        assert pypuppetdb.utils.versioncmp('2.1', '2.2') < 0
        assert pypuppetdb.utils.versioncmp('3.0.4.10', '3.0.4.2') > 0
        assert pypuppetdb.utils.versioncmp('4.08', '4.08.1') < 0
        assert pypuppetdb.utils.versioncmp('3.2.1.9.8144', '3.2') > 0
        assert pypuppetdb.utils.versioncmp('3.2', '3.2.1.9.8144') < 0
        assert pypuppetdb.utils.versioncmp('1.2', '2.1') < 0
        assert pypuppetdb.utils.versioncmp('2.1', '1.2') > 0
        assert pypuppetdb.utils.versioncmp('5.6.7', '5.6.7') == 0
        assert pypuppetdb.utils.versioncmp('1.01.1', '1.1.1') == 0
        assert pypuppetdb.utils.versioncmp('1.1.1', '1.01.1') == 0
        assert pypuppetdb.utils.versioncmp('1', '1.0') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1.0.1') < 0
        assert pypuppetdb.utils.versioncmp('1.0.1', '1.0') > 0
        assert pypuppetdb.utils.versioncmp('1.0.2.0', '1.0.2') == 0
github voxpupuli / pypuppetdb / tests / test_utils.py View on Github external
def test_versioncmp(self):
        assert pypuppetdb.utils.versioncmp('1', '1') == 0
        assert pypuppetdb.utils.versioncmp('2.1', '2.2') < 0
        assert pypuppetdb.utils.versioncmp('3.0.4.10', '3.0.4.2') > 0
        assert pypuppetdb.utils.versioncmp('4.08', '4.08.1') < 0
        assert pypuppetdb.utils.versioncmp('3.2.1.9.8144', '3.2') > 0
        assert pypuppetdb.utils.versioncmp('3.2', '3.2.1.9.8144') < 0
        assert pypuppetdb.utils.versioncmp('1.2', '2.1') < 0
        assert pypuppetdb.utils.versioncmp('2.1', '1.2') > 0
        assert pypuppetdb.utils.versioncmp('5.6.7', '5.6.7') == 0
        assert pypuppetdb.utils.versioncmp('1.01.1', '1.1.1') == 0
        assert pypuppetdb.utils.versioncmp('1.1.1', '1.01.1') == 0
        assert pypuppetdb.utils.versioncmp('1', '1.0') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1') == 0
        assert pypuppetdb.utils.versioncmp('1.0', '1.0.1') < 0
        assert pypuppetdb.utils.versioncmp('1.0.1', '1.0') > 0
        assert pypuppetdb.utils.versioncmp('1.0.2.0', '1.0.2') == 0