class documentation

class VersionsTests(TestCase):

View In Hierarchy

Undocumented

Method test_base The base method returns a very simple representation of the version.
Method test_baseWithDev The base version includes 'devX' for versions with dev releases.
Method test_baseWithDevAndPost The base version includes 'postXdevX' for versions with dev releases and a postrelease.
Method test_baseWithDevAndRC The base version includes 'rcXdevX' for versions with dev releases and a release candidate.
Method test_baseWithNEXT The base method returns just "NEXT" when NEXT is the major version.
Method test_baseWithPost The base version includes 'postX' for versions with postreleases.
Method test_baseWithPrerelease The base version includes 'rcX' for versions with prereleases.
Method test_baseWithReleaseCandidate The base version includes 'rcX' for versions with prereleases.
Method test_comparingDev The value specified as the dev release is used in version comparisons.
Method test_comparingDevAndRC The value specified as the dev release and release candidate is used in version comparisons.
Method test_comparingDevAndRCDifferent The value specified as the dev release and release candidate is used in version comparisons.
Method test_comparingDevReleasesWithPreviousPostReleases Dev releases are always greater than postreleases based on previous releases.
Method test_comparingDevReleasesWithReleases Dev releases are always less than versions without dev releases.
Method test_comparingNEXTReleases NEXT releases are always larger than numbered releases.
Method test_comparingNEXTReleasesEqual NEXT releases are equal to each other.
Method test_comparingPost The value specified as the postrelease is used in version comparisons.
Method test_comparingPostReleasesWithReleases Post releases are always greater than versions without post releases.
Method test_comparingPrereleasesWithReleases Prereleases are always less than versions without prereleases.
Method test_comparingReleaseCandidates The value specified as the release candidate is used in version comparisons.
Method test_comparingReleaseCandidatesWithReleases Release Candidates are always less than versions without release candidates.
Method test_disallowBuggyComparisons The package names of the Version objects need to be the same.
Method test_getVersionString getVersionString returns a string with the package name and the short version number.
Method test_getVersionStringWithDev getVersionString includes the dev release, if any.
Method test_getVersionStringWithDevAndPost getVersionString includes the dev release and postrelease, if any.
Method test_getVersionStringWithDevAndRC getVersionString includes the dev release and release candidate, if any.
Method test_getVersionStringWithPost getVersionString includes the postrelease, if any.
Method test_getVersionStringWithPrerelease getVersionString includes the prerelease as a release candidate, if any.
Method test_getVersionStringWithReleaseCandidate getVersionString includes the release candidate, if any.
Method test_infComparison _inf is equal to _inf.
Method test_localIsShort The local version is the same as the short version.
Method test_NEXTMustBeAlone NEXT releases must always have the rest of the numbers set to 0.
Method test_notImplementedComparisons Comparing a Version to some other object type results in NotImplemented.
Method test_prereleaseAttributeDeprecated Accessing 'prerelease' on a Version is deprecated.
Method test_prereleaseDeprecated Passing 'prerelease' to Version is deprecated.
Method test_rcEqualspre Release Candidates are equal to prereleases.
Method test_rcOrpreButNotBoth Release Candidate and prerelease can't both be given.
Method test_repr Calling repr on a version returns a human-readable string representation of the version.
Method test_reprWithDev Calling repr on a version with a dev release returns a human-readable string representation of the version including the dev release.
Method test_reprWithPost Calling repr on a version with a postrelease returns a human-readable string representation of the version including the postrelease.
Method test_reprWithPrerelease Calling repr on a version with a prerelease returns a human-readable string representation of the version including the prerelease as a release candidate..
Method test_reprWithReleaseCandidate Calling repr on a version with a release candidate returns a human-readable string representation of the version including the rc.
Method test_str Calling str on a version returns a human-readable string representation of the version.
Method test_strWithDev Calling str on a version with a dev release includes the dev release.
Method test_strWithDevAndPost Calling str on a version with a postrelease and dev release includes the postrelease and the dev release.
Method test_strWithDevAndReleaseCandidate Calling str on a version with a release candidate and dev release includes the release candidate and the dev release.
Method test_strWithPost Calling str on a version with a postrelease includes the postrelease.
Method test_strWithPrerelease Calling str on a version with a prerelease includes the prerelease as a release candidate.
Method test_strWithReleaseCandidate Calling str on a version with a release candidate includes the release candidate.
Method test_versionComparison Versions can be compared for equality and order.
Method test_versionComparisonCaseInsensitive Version package names are case insensitive.
Method test_versionComparisonNonVersion Versions can be compared with non-versions.
Method testShort Undocumented
def test_base(self):

The base method returns a very simple representation of the version.

def test_baseWithDev(self):

The base version includes 'devX' for versions with dev releases.

def test_baseWithDevAndPost(self):

The base version includes 'postXdevX' for versions with dev releases and a postrelease.

def test_baseWithDevAndRC(self):

The base version includes 'rcXdevX' for versions with dev releases and a release candidate.

def test_baseWithNEXT(self):

The base method returns just "NEXT" when NEXT is the major version.

def test_baseWithPost(self):

The base version includes 'postX' for versions with postreleases.

def test_baseWithPrerelease(self):

The base version includes 'rcX' for versions with prereleases.

def test_baseWithReleaseCandidate(self):

The base version includes 'rcX' for versions with prereleases.

def test_comparingDev(self):

The value specified as the dev release is used in version comparisons.

def test_comparingDevAndRC(self):

The value specified as the dev release and release candidate is used in version comparisons.

def test_comparingDevAndRCDifferent(self):

The value specified as the dev release and release candidate is used in version comparisons.

def test_comparingDevReleasesWithPreviousPostReleases(self):

Dev releases are always greater than postreleases based on previous releases.

def test_comparingDevReleasesWithReleases(self):

Dev releases are always less than versions without dev releases.

def test_comparingNEXTReleases(self):

NEXT releases are always larger than numbered releases.

def test_comparingNEXTReleasesEqual(self):

NEXT releases are equal to each other.

def test_comparingPost(self):

The value specified as the postrelease is used in version comparisons.

def test_comparingPostReleasesWithReleases(self):

Post releases are always greater than versions without post releases.

def test_comparingPrereleasesWithReleases(self):

Prereleases are always less than versions without prereleases.

def test_comparingReleaseCandidates(self):

The value specified as the release candidate is used in version comparisons.

def test_comparingReleaseCandidatesWithReleases(self):

Release Candidates are always less than versions without release candidates.

def test_disallowBuggyComparisons(self):

The package names of the Version objects need to be the same.

def test_getVersionString(self):

getVersionString returns a string with the package name and the short version number.

def test_getVersionStringWithDev(self):

getVersionString includes the dev release, if any.

def test_getVersionStringWithDevAndPost(self):

getVersionString includes the dev release and postrelease, if any.

def test_getVersionStringWithDevAndRC(self):

getVersionString includes the dev release and release candidate, if any.

def test_getVersionStringWithPost(self):

getVersionString includes the postrelease, if any.

def test_getVersionStringWithPrerelease(self):

getVersionString includes the prerelease as a release candidate, if any.

def test_getVersionStringWithReleaseCandidate(self):

getVersionString includes the release candidate, if any.

def test_infComparison(self):

_inf is equal to _inf.

This is a regression test.

def test_localIsShort(self):

The local version is the same as the short version.

def test_NEXTMustBeAlone(self):

NEXT releases must always have the rest of the numbers set to 0.

def test_notImplementedComparisons(self):

Comparing a Version to some other object type results in NotImplemented.

def test_prereleaseAttributeDeprecated(self):

Accessing 'prerelease' on a Version is deprecated.

def test_prereleaseDeprecated(self):

Passing 'prerelease' to Version is deprecated.

def test_rcEqualspre(self):

Release Candidates are equal to prereleases.

def test_rcOrpreButNotBoth(self):

Release Candidate and prerelease can't both be given.

def test_repr(self):

Calling repr on a version returns a human-readable string representation of the version.

def test_reprWithDev(self):

Calling repr on a version with a dev release returns a human-readable string representation of the version including the dev release.

def test_reprWithPost(self):

Calling repr on a version with a postrelease returns a human-readable string representation of the version including the postrelease.

def test_reprWithPrerelease(self):

Calling repr on a version with a prerelease returns a human-readable string representation of the version including the prerelease as a release candidate..

def test_reprWithReleaseCandidate(self):

Calling repr on a version with a release candidate returns a human-readable string representation of the version including the rc.

def test_str(self):

Calling str on a version returns a human-readable string representation of the version.

def test_strWithDev(self):

Calling str on a version with a dev release includes the dev release.

def test_strWithDevAndPost(self):

Calling str on a version with a postrelease and dev release includes the postrelease and the dev release.

def test_strWithDevAndReleaseCandidate(self):

Calling str on a version with a release candidate and dev release includes the release candidate and the dev release.

def test_strWithPost(self):

Calling str on a version with a postrelease includes the postrelease.

def test_strWithPrerelease(self):

Calling str on a version with a prerelease includes the prerelease as a release candidate.

def test_strWithReleaseCandidate(self):

Calling str on a version with a release candidate includes the release candidate.

def test_versionComparison(self):

Versions can be compared for equality and order.

def test_versionComparisonCaseInsensitive(self):

Version package names are case insensitive.

@unittest.skipIf((sys.version_info < (3,)), 'Comparisons do not raise on py2')
def test_versionComparisonNonVersion(self):

Versions can be compared with non-versions.

def testShort(self):

Undocumented