28
28
from distutils .dist import Distribution
29
29
30
30
31
+ # Hello future maintainer! Several tests in here include a version number in a
32
+ # path. It is by pure coincidence that these happen to match the current
33
+ # version number, if in fact they still do. We set the version number for the
34
+ # tests in self.attrs, and it can be anything as long as the other version
35
+ # numbers in the file match.
31
36
class TestBDistPrestoAdmin (BaseTestCase ):
32
37
def setUp (self ):
33
38
super (TestBDistPrestoAdmin , self ).setUp ()
34
39
self .attrs = {
35
40
'name' : 'prestoadmin' ,
36
41
'cmdclass' : {'bdist_prestoadmin' : bdist_prestoadmin },
37
- 'version' : '1.1 ' ,
42
+ 'version' : '1.2 ' ,
38
43
'packages' : ['prestoadmin' ],
39
44
'package_dir' : {'prestoadmin' : 'prestoadmin' },
40
45
'install_requires' : ['fabric' ]
@@ -88,7 +93,7 @@ def test_finalize_argvs(self):
88
93
89
94
@patch ('distutils.core.Command.run_command' )
90
95
def test_build_wheel (self , run_command_mock ):
91
- self .assertEquals ('prestoadmin-1.1 -py2-none-any' ,
96
+ self .assertEquals ('prestoadmin-1.2 -py2-none-any' ,
92
97
self .bdist .build_wheel ('build' ))
93
98
94
99
@patch ('packaging.bdist_prestoadmin.urllib.urlretrieve' )
@@ -209,7 +214,7 @@ def test_archive_dist_offline(self):
209
214
mkpath (build_path )
210
215
self .bdist .archive_dist (build_path , 'dist' )
211
216
212
- archive = os .path .join ('dist' , 'prestoadmin-1.1 -offline.tar.bz2' )
217
+ archive = os .path .join ('dist' , 'prestoadmin-1.2 -offline.tar.bz2' )
213
218
self .assertTrue (os .path .exists (archive ))
214
219
finally :
215
220
remove_tree (os .path .dirname (build_path ))
@@ -222,7 +227,7 @@ def test_archive_dist_online(self):
222
227
self .bdist .online_install = True
223
228
self .bdist .archive_dist (build_path , 'dist' )
224
229
225
- archive = os .path .join ('dist' , 'prestoadmin-1.1 -online.tar.bz2' )
230
+ archive = os .path .join ('dist' , 'prestoadmin-1.2 -online.tar.bz2' )
226
231
self .assertTrue (os .path .exists (archive ))
227
232
finally :
228
233
remove_tree (os .path .dirname (build_path ))
0 commit comments