Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flake8 contrib/ and lib/tool_shed/ . #708

Merged
merged 2 commits into from
Sep 10, 2015

Conversation

nsoranzo
Copy link
Member

@nsoranzo nsoranzo commented Sep 9, 2015

Also:

  • use sys.exit() instead of exit()
  • fix sys.path manipulations.

Also:
- use sys.exit() instead of exit()
- fix sys.path manipulations.
new_path = [ os.path.join( os.path.dirname( __file__ ), os.pardir, os.pardir, os.pardir, os.pardir, 'lib' ) ]
new_path.extend( sys.path[ 1: ] )
sys.path = new_path
sys.path.insert(1, os.path.join( os.path.dirname( __file__ ), os.pardir, os.pardir, os.pardir ) )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't have to end with lib?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this file is already in a subdirectory of lib, so I have removed os.pardir, 'lib' .

@jmchilton
Copy link
Member

👍

@martenson
Copy link
Member

This breaks 2 tests for me (./run_tests.sh -toolshed):

======================================================================
ERROR: Verify the exported capsule contents.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/marten/devel/git/galaxy/test/tool_shed/functional/test_0490_export_import_repositories.py", line 82, in test_0015_verify_exported_capsule
    self.verify_capsule_contents( capsule_filepath, owner=common.test_user_1_name )
  File "/Users/marten/devel/git/galaxy/test/tool_shed/base/twilltestcase.py", line 1313, in verify_capsule_contents
    tar_object = tarfile.open( capsule_filepath, 'r:*' )
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py", line 1651, in open
    raise ValueError("nothing to open")
ValueError: nothing to open

======================================================================
ERROR: Import the exported repository capsule.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/marten/devel/git/galaxy/test/tool_shed/functional/test_0490_export_import_repositories.py", line 94, in test_0020_import_repository_capsule
    strings_displayed_after_submit=[ 'Import not necessary', 'Exists' ] )
  File "/Users/marten/devel/git/galaxy/test/tool_shed/base/twilltestcase.py", line 829, in import_capsule
    tc.formfile( 'upload_capsule', 'file_data', filename )
  File "/Users/marten/devel/git/galaxy/eggs/twill-0.9-py2.7.egg/twill/commands.py", line 481, in formfile
    fp = open(filename, 'rb')
IOError: [Errno 2] No such file or directory: ''

@martenson
Copy link
Member

seems the tests were failing randomly, 👍

martenson added a commit that referenced this pull request Sep 10, 2015
flake8 contrib/ and lib/tool_shed/ .
@martenson martenson merged commit b1b7109 into galaxyproject:dev Sep 10, 2015
@martenson martenson added the kind/refactoring cleanup or refactoring of existing code, no functional changes label Sep 10, 2015
@nsoranzo
Copy link
Member Author

xref: #391

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement kind/refactoring cleanup or refactoring of existing code, no functional changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants