-
Notifications
You must be signed in to change notification settings - Fork 18
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
Flake #96
Flake #96
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not 100% on all these style choices but no errors found. I think that TestVsync class should be renamed. Not needed for this pull request.
- for i in $(ls -d */); do | ||
cd $i; | ||
pytest --cov $i || exit 1; | ||
if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we stop testing against Python 3.5 at some point then this will be skipped. Is that OK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The is no point in running some of these tasks for all versions of Python so I've picked one. Yes, eventually we'll have to update to a different one.
@@ -4,4 +4,4 @@ | |||
This application mounts a VOSpace service to the local file system | |||
using fuse. | |||
""" | |||
from vofs import * | |||
from vofs import * # noqa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does 'noqa' mean? I guess this is some code flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noqa = No Quality Assurance. flake8 understandably doesn't like import *.
help="Mount the filesystem as a foreground opperation and " + | ||
"produce copious amounts of debuging information") | ||
parser.add_option( | ||
"-f", "--foreground", action="store_true", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sort of line feed push is ugly and I think an auto generated thing. Note that line 30 did NOT get its arguments wrapped in this way. I suspect the issue is that action="store_true" should be on its own line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you brake the arguments, then you have to align them at the opening bracket which makes the subsequent lines quite short.
default=50 * 2 ** (10 + 10 + 10)) | ||
help="File to store debug log to", | ||
default="/tmp/vos.err") | ||
parser.add_option( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto to the previous comment about argument ugliness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Matter of taste.
vofs/vofs/mountvofs.py
Outdated
|
||
opt = parser.parse_args() | ||
set_logging_level_from_args(opt) | ||
|
||
log_format = ("%(asctime)s %(thread)d vos-"+str(version)+" %(module)s.%(funcName)s.%(lineno)d %(message)s") | ||
log_format = ("%(asctime)s %(thread)d vos-" + str( | ||
version) + " %(module)s.%(funcName)s.%(lineno)d %(message)s") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Poor choice of wrapping point.
@@ -1,4 +0,0 @@ | |||
# Licensed under a 3-clause BSD style license - see LICENSE.rst | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this removed? Or is it? I'm confused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not needed since tests is not a module.
vos/vos/commands/vchmod.py
Outdated
@@ -6,7 +6,8 @@ | |||
unicode_literals) | |||
from ..vos import Client | |||
from ..vos import CADC_GMS_PREFIX | |||
from ..commonparser import CommonParser, set_logging_level_from_args, exit_on_exception | |||
from ..commonparser import CommonParser, set_logging_level_from_args, \ | |||
exit_on_exception |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would look cleaner if the from .. part was repeated.
vos/vos/commands/tests/test_cli.py
Outdated
outputs = [MyExitError] * (len(cmds.__all__) + 3) | ||
|
||
|
||
class TestVsync(unittest.TestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the wrong name for this class? TestCLI maybe?
No description provided.