def test_version_dev_wo_pep440_git_describe(self): v105 = Version(release=(1,0,5), dev=4) v105._update_from_vcs('v1.0.6dev4-42-gabcdefgh') self.assertEqual(v105.release, (1,0,6)) self.assertEqual(v105.commit_count, 42) self.assertEqual(v105.dev, 4) self.assertEqual(v105.commit, 'abcdefgh')
def test_version_simple_git_describe(self): v105 = Version(release=(1,0,5)) v105._update_from_vcs('v1.0.5-42-gabcdefgh') self.assertEqual(v105.release, (1,0,5)) self.assertEqual(v105.commit_count, 42) self.assertEqual(v105.dev, None) self.assertEqual(v105.commit, 'abcdefgh')
def get_setup_version(reponame): """Use autover to get up to date version.""" # importing self into setup.py is unorthodox, but param has no # required dependencies outside of python from param.version import Version return Version.setup_version(os.path.dirname(__file__), reponame, archive_commit="$Format:%h$")
Callable objects that generate numbers according to different distributions. """ import random import operator import hashlib import struct import fractions from math import e, pi import param from param.version import Version __version__ = Version(release=(1, 3, 2), fpath=__file__, commit="1459880", reponame="param") class TimeAware(param.Parameterized): """ Class of objects that have access to a global time function and have the option of using it to generate time-dependent values as necessary. In the simplest case, an object could act as a strict function of time, returning the current time transformed according to a fixed equation. Other objects may support locking their results to a timebase, but also work without time. For instance, objects with random state could return a new random value for every call, with no notion of time, or could always return the same value until the
from param.version import Version __version__ = str( Version(fpath=__file__, archive_commit="66e9a311", reponame="pkg_params"))
Callable objects that generate numbers according to different distributions. """ import random import operator import hashlib import struct import fractions from math import e, pi import param from param.version import Version __version__ = Version(release=(1, 5, 1), fpath=__file__, commit="aa087db2", reponame="param") class TimeAware(param.Parameterized): """ Class of objects that have access to a global time function and have the option of using it to generate time-dependent values as necessary. In the simplest case, an object could act as a strict function of time, returning the current time transformed according to a fixed equation. Other objects may support locking their results to a timebase, but also work without time. For instance, objects with random state could return a new random value for every call, with no notion of time, or could always return the same value until the
def test_version_init_v1(self): Version(release=(1, 0))
def test_version_greater_than(self): v1 = Version(release=(1, 0)) v101 = Version(release=(1, 0, 1)) self.assertEqual((v1 > v101), False)
def test_version_commit(self): "No version control system assumed for tests" v1 = Version(release=(1, 0), commit='shortSHA') self.assertEqual(v1.commit, 'shortSHA')
def test_version_v101_dirty(self): v101 = Version(release=(1, 0, 1)) self.assertEqual(v101.dirty, False)
from param.version import Version __version__ = str( Version(fpath=__file__, archive_commit="$Format:%h$", reponame="pyct")) del Version
def get_setup_version(reponame): """Use autover to get up to date version.""" # importing self into setup.py is unorthodox, but param has no # required dependencies outside of python from param.version import Version return Version.setup_version(os.path.dirname(__file__),reponame,archive_commit="$Format:%h$")
def test_version_str_v1dev3(self): v1 = Version(release=(1,0),dev=3) self.assertEqual(str(v1), '1.0.dev3')
def test_version_neq_v101_dev(self): v101dev2 = Version(release=(1,0,1), dev=2) v101dev3 = Version(release=(1,0,1), dev=3) self.assertEqual(v101dev2!=v101dev3, True)
def test_version_greater_than_dev(self): v101 = Version(release=(1,0,1)) v102dev3 = Version(release=(1,0,2), dev=3) self.assertEqual((v102dev3 > v101), True)
def test_version_str_v101(self): v101 = Version(release=(1, 0, 1)) self.assertEqual(str(v101), '1.0.1')
Callable objects that generate numbers according to different distributions. """ import random import operator import hashlib import struct import fractions from math import e, pi import param from param.version import Version __version__ = Version(release=(1, 5, 1), fpath=__file__, commit="39b370df", reponame="param") class TimeAware(param.Parameterized): """ Class of objects that have access to a global time function and have the option of using it to generate time-dependent values as necessary. In the simplest case, an object could act as a strict function of time, returning the current time transformed according to a fixed equation. Other objects may support locking their results to a timebase, but also work without time. For instance, objects with random state could return a new random value for every call, with no notion of time, or could always return the same value until the
def test_version_v101_commit_count(self): v101 = Version(release=(1, 0, 1)) self.assertEqual(v101.commit_count, 0)
def test_repr_v1(self): v1 = Version(release=(1, 0)) self.assertEqual(repr(v1), '1.0')
def test_version_less_than(self): v1 = Version(release=(1, 0)) v101 = Version(release=(1, 0, 1)) self.assertEqual((v1 < v101), True)
def test_repr_v101(self): v101 = Version(release=(1, 0, 1), commit='fffffff') if not ((repr(v101) == '1.0.1-0-gfffffff') or (repr(v101), '1.0.1-x-gfffffff')): raise AssertionError('Unexpected version string returned')
def test_version_eq_v101(self): v101 = Version(release=(1, 0, 1)) self.assertEqual(v101 == v101, True)
def test_repr_v101_10_commits(self): v101 = Version(release=(1, 0, 1), commit_count=10, commit='aaaaaaa') self.assertEqual(repr(v101), '1.0.1-10-gaaaaaaa')
def test_version_neq(self): v1 = Version(release=(1, 0)) v101 = Version(release=(1, 0, 1)) self.assertEqual(v1 != v101, True)
def test_repr_v1(self): v1 = Version(release=(1, 0)) self.assertEqual(repr(v1), 'Version((1, 0),None,None)')
Callable objects that generate numbers according to different distributions. """ import random import operator import hashlib import struct import fractions from math import e, pi import param from param.version import Version __version__ = Version(release=(1, 5, 0), fpath=__file__, commit="7f1db3f0", reponame="param") class TimeAware(param.Parameterized): """ Class of objects that have access to a global time function and have the option of using it to generate time-dependent values as necessary. In the simplest case, an object could act as a strict function of time, returning the current time transformed according to a fixed equation. Other objects may support locking their results to a timebase, but also work without time. For instance, objects with random state could return a new random value for every call, with no notion of time, or could always return the same value until the
def test_repr_v101(self): v101 = Version(release=(1, 0, 1), commit='shortSHA') self.assertEqual(repr(v101), "Version((1, 0, 1),None,'shortSHA')")
Callable objects that generate numbers according to different distributions. """ import random import operator import hashlib import struct import fractions from math import e,pi import param from param.version import Version __version__ = Version(release=(1,3,2), fpath=__file__, commit="8b8409aa", reponame="param") class TimeAware(param.Parameterized): """ Class of objects that have access to a global time function and have the option of using it to generate time-dependent values as necessary. In the simplest case, an object could act as a strict function of time, returning the current time transformed according to a fixed equation. Other objects may support locking their results to a timebase, but also work without time. For instance, objects with random state could return a new random value for every call, with no notion of time, or could always return the same value until the global time changes. Subclasses should thus provide an ability to
def test_version_str_v1(self): v1 = Version(release=(1, 0)) self.assertEqual(str(v1), '1.0')
def test_version_release_v101(self): v101 = Version(release=(1, 0, 1)) self.assertEqual(v101.release, (1, 0, 1))
def test_version_less_than_dev_number(self): v101dev1 = Version(release=(1,0,1), dev=1) v101dev2 = Version(release=(1,0,1), dev=2) self.assertEqual((v101dev1 < v101dev2), True)