File tree Expand file tree Collapse file tree 6 files changed +15
-10
lines changed Expand file tree Collapse file tree 6 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 11include *.md
2- include VERSION
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ Client Library Development
146146### Releasing
147147
148148 1 . Add new features to [ CHANGELOG.md] ( CHANGELOG.md )
149- 1 . Bump the version in ` VERSION `
149+ 1 . Bump the version in ` easypost/version.py ` and ` setup.py `
150150 1 . Create a git tag
151151 1 . Push to PyPI with ` python setup.py sdist upload `
152152
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11import pkg_resources
22
33
4- VERSION = pkg_resources . resource_stream ( 'easypost' , '../VERSION' ). read (). decode ( 'utf-8' ). strip ()
4+ VERSION = '4.0.1'
55
66if '-' in VERSION :
77 VERSION_INFO = tuple ([int (v ) for v in VERSION .split ('-' )[0 ].split ('.' )] + VERSION .split ('-' )[1 :])
Original file line number Diff line number Diff line change 1111]
1212
1313
14- with open ('VERSION' , 'r' ) as f :
15- version = f .read ().strip ()
16-
17-
1814if sys .version_info < (3 , 0 ):
1915 long_description_open = io .open
2016else :
2622
2723setup (
2824 name = 'easypost' ,
29- version = version ,
25+ version = '4.0.1' ,
3026 description = 'EasyPost Shipping API Client Library for Python' ,
3127 author = 'EasyPost' ,
32283329 url = 'https://easypost.com/' ,
3430 packages = ['easypost' ],
35- package_data = {'easypost' : ['../VERSION' ]},
3631 install_requires = install_requires ,
3732 test_suite = 'test' ,
3833 long_description = long_description ,
Original file line number Diff line number Diff line change 1+ import easypost
2+ import re
3+
4+
5+ def test_version_makes_sense ():
6+ assert re .match (r'^([0-9]+\.)*[0-9]$' , easypost .__version__ )
7+ assert isinstance (easypost .version_info , tuple )
8+ assert all (isinstance (part , int ) for part in easypost .version_info )
9+
10+
11+ def test_author_makes_sense ():
12+ assert re .match (r'.* \<\w+@easypost\.com\>$' , easypost .__author__ )
You can’t perform that action at this time.
0 commit comments