File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 2626from __future__ import print_function
2727
2828import os .path
29+ import shutil
2930
30- from commoncode .testcase import FileBasedTesting
3131
32+ from commoncode .testcase import FileBasedTesting
3233from packagedcode import pypi
3334
3435
@@ -45,7 +46,9 @@ def test_parse(self):
4546 assert 'https://github.com/nexB/scancode-toolkit' == package .homepage_url
4647
4748 def test_get_attribute (self ):
48- test_file = self .get_test_loc ('pypi/setup2.py' )
49+ test_input = self .get_test_loc ('pypi/setup2.py' )
50+ test_file = self .get_temp_file ('setup.py' )
51+ shutil .copyfile (test_input , test_file )
4952 assert 'scancode-toolkit' == pypi .get_attribute (test_file , 'name' )
5053 assert '1.5.0' == pypi .get_attribute (test_file , 'version' )
5154 assert 'ScanCode' == pypi .get_attribute (test_file , 'author' )
You can’t perform that action at this time.
0 commit comments