Closed yan12125 closed 6 years ago
For example, a PKGBUILD with pkgrel=10 should become pkgrel=11 after calling update_pkgrel().
PKGBUILD
pkgrel=10
pkgrel=11
update_pkgrel()
The test suite uses pytest. A sample run:
$ py.test-3.6 -v ===================================================== test session starts ====================================================== platform darwin -- Python 3.6.5, pytest-3.5.1, py-1.5.3, pluggy-0.6.0 -- /opt/local/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6 cachedir: .pytest_cache rootdir: /Users/yen/Projects/lilac, inifile: collected 5 items test/test_lilaclib.py::test_update_pkgrel[pkgrel=1-pkgrel=2-kwargs0] PASSED [ 20%] test/test_lilaclib.py::test_update_pkgrel[pkgrel=10-pkgrel=11-kwargs1] PASSED [ 40%] test/test_lilaclib.py::test_update_pkgrel[pkgrel=1.1-pkgrel=2-kwargs2] PASSED [ 60%] test/test_lilaclib.py::test_update_pkgrel[pkgrel="1"-pkgrel=2-kwargs3] PASSED [ 80%] test/test_lilaclib.py::test_update_pkgrel[pkgrel=1-pkgrel=3-kwargs4] PASSED [100%] =================================================== 5 passed in 0.22 seconds ===================================================
Fixed whitespacing - 'pkgbuild,expected_pkgbuild, kwargs' => 'pkgbuild, expected_pkgbuild, kwargs'
'pkgbuild,expected_pkgbuild, kwargs'
'pkgbuild, expected_pkgbuild, kwargs'
Thanks!
For example, a
PKGBUILD
withpkgrel=10
should becomepkgrel=11
after callingupdate_pkgrel()
.The test suite uses pytest. A sample run: