Merge lp://staging/~psivaa/auto-upgrade-testing/bug1159671 into lp://staging/~auto-upgrade-testing-dev/auto-upgrade-testing/trunk

Proposed by Para Siva
Status: Needs review
Proposed branch: lp://staging/~psivaa/auto-upgrade-testing/bug1159671
Merge into: lp://staging/~auto-upgrade-testing-dev/auto-upgrade-testing/trunk
Diff against target: 125 lines (+32/-18)
1 file modified
share/post_upgrade_tests/test_python_import.py (+32/-18)
To merge this branch: bzr merge lp://staging/~psivaa/auto-upgrade-testing/bug1159671
Reviewer Review Type Date Requested Status
Para Siva (community) Needs Resubmitting
Paul Larson (community) Needs Fixing
Auto Upgrade Testing Developers Pending
Review via email: mp+155819@code.staging.launchpad.net

Description of the change

The change is to try and import all the possible modules from sys.path as specified in bug 1159671.
The main change is on rev 75. The next one is re: pep8 changes.

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

82 - self.distpackages = '/usr/lib/%s/dist-packages/' % self.default_version
83 - self.stderr = open('/tmp/%s.stderr' % os.path.basename(__file__)[:-3],'w')
84 + self.distpackages = []
85 + for dist_path in sys.path:
86 + if 'dist-packages' in dist_path:
One of the goals here was to specifically pick up the python standard libraries. Restricting to dist-packages won't accomplish that unfortunately.

87 + if dist_path[0:dist_path.find('dist-packages') + 13] \
I prefer to avoid magic numbers

review: Needs Fixing
77. By Para Siva

Allowing to test the imports from all the possible paths in sys.path

Revision history for this message
Para Siva (psivaa) wrote :

OK, thanks. The restriction of testing the imports from dist-packages has now been removed. That removed the magic number changes too. It would be helpful to get the feedback on this. Thanks

review: Needs Resubmitting

Unmerged revisions

77. By Para Siva

Allowing to test the imports from all the possible paths in sys.path

76. By Para Siva

Formatting pep8 changes

75. By Para Siva

testing python imports from sys.path

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches