diff options
author | w0rp <devw0rp@gmail.com> | 2019-04-07 14:58:06 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2019-04-07 14:58:06 +0100 |
commit | 3bebcb5d48a7150f5a318952ee309acb67fb376d (patch) | |
tree | 97edd84badca566894fd4c4f10c2a786df2fe079 /test/test_semver_utils.vader | |
parent | cdf89f8269aec31d0dfddf3a2769027d72d38155 (diff) | |
download | ale-3bebcb5d48a7150f5a318952ee309acb67fb376d.zip |
#2132 - Replace command_chain and chain_with with ale#command#Run
Diffstat (limited to 'test/test_semver_utils.vader')
-rw-r--r-- | test/test_semver_utils.vader | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/test/test_semver_utils.vader b/test/test_semver_utils.vader index 62483505..b38feb06 100644 --- a/test/test_semver_utils.vader +++ b/test/test_semver_utils.vader @@ -1,32 +1,20 @@ After: call ale#semver#ResetVersionCache() -Execute(GetVersion should return the version from the lines of output): +Execute(ParseVersion should return the version from the lines of output): " We should be able to parse the semver string from flake8 - AssertEqual [3, 0, 4], ale#semver#GetVersion('dummy', [ + AssertEqual [3, 0, 4], ale#semver#ParseVersion([ \ '3.0.4 (mccabe: 0.5.2, pyflakes: 1.2.3, pycodestyle: 2.0.0) CPython 2.7.12 on Linux', \ '1.2.3', \]) -Execute(GetVersion should return an empty list when no vesrion can be found): - AssertEqual [], ale#semver#GetVersion('dummy', ['x']) - AssertEqual [], ale#semver#GetVersion('dummy', []) +Execute(ParseVersion should return an empty list when no vesrion can be found): + AssertEqual [], ale#semver#ParseVersion(['x']) + AssertEqual [], ale#semver#ParseVersion([]) -Execute(GetVersion should cache the version): - AssertEqual [], ale#semver#GetVersion('dummy', []) - AssertEqual [3, 4, 7], ale#semver#GetVersion('dummy', ['Version 3.4.7']) - AssertEqual [3, 4, 17], ale#semver#GetVersion('dummy', ['Version 3.4.17']) - AssertEqual [3, 4, 17], ale#semver#GetVersion('dummy', []) - -Execute(GetVersion should tolerate missing patch numbers): +Execute(ParseVersion should tolerate missing patch numbers): " This goes against the semver spec, but we handle it anyway. - AssertEqual [3, 4, 0], ale#semver#GetVersion('dummy', ['Version 3.4']) - -Execute(HasVersion should return 1 when the version has been cached): - call ale#semver#GetVersion('dummy', []) - AssertEqual 0, ale#semver#HasVersion('dummy') - call ale#semver#GetVersion('dummy', ['3.4.7']) - AssertEqual 1, ale#semver#HasVersion('dummy') + AssertEqual [3, 4, 0], ale#semver#ParseVersion(['Version 3.4']) Execute(GTE should compare triples correctly): Assert ale#semver#GTE([3, 0, 4], [3, 0, 0]) |