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

Fixing bug : Check item type when found folder sequence #62

Merged
merged 7 commits into from
Nov 7, 2016

Conversation

mguiral
Copy link
Member

@mguiral mguiral commented Nov 7, 2016

#61

@coveralls
Copy link

coveralls commented Nov 7, 2016

Coverage Status

Coverage remained the same at 63.148% when pulling d1d308a on folderSymbolicLink into f58fb99 on develop.

@coveralls
Copy link

coveralls commented Nov 7, 2016

Coverage Status

Coverage remained the same at 63.148% when pulling 505cb91 on folderSymbolicLink into f58fb99 on develop.

@@ -30,6 +30,7 @@ def setUp():

# create sym link
os.symlink(os.path.join(root_path, "plop.txt"), os.path.join(root_path, "plop_sym_link.txt"))
os.symlink(os.path.join(root_path, "dir1"), os.path.join(root_path, "dir2"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could this line be removed?

Copy link
Member Author

@mguiral mguiral Nov 7, 2016

Choose a reason for hiding this comment

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

Yes i will remove it

- 2 hard links (. and ..)
- sizes
"""
print("testFolderLinkStat:")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could these print be removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes i will remove it


def testLinkType():
"""
Check stats of a synbolic link folder.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you update this doc? Something like:
"""
Check the type of the items found.
"""


# create sym link
os.symlink(os.path.join(root_path, "plop.txt"), os.path.join(root_path, "plop_sym_link.txt"))
os.symlink(os.path.join(root_path, "dir1"), os.path.join(root_path, "dir2"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think to rename dir2 to dir1_sym_link?

Copy link
Member Author

Choose a reason for hiding this comment

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

The aim is to test the browse method when folder sequence detected

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oups yes you are right: so the name dir2 is important.

@@ -154,7 +154,7 @@ std::vector<Item> browse(
// It's a sequence of directories, so it's not a sequence.
BOOST_FOREACH( Time t, s.getFramesIterable() )
{
output.push_back( Item( eTypeFolder, directory / s.getFilenameAt(t) ) );
output.push_back( Item( getTypeFromPath(directory / s.getFilenameAt(t)), directory / s.getFilenameAt(t) ) );
Copy link
Contributor

Choose a reason for hiding this comment

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

You can create a variable for directory / s.getFilenameAt(t).

@coveralls
Copy link

coveralls commented Nov 7, 2016

Coverage Status

Coverage increased (+0.03%) to 63.182% when pulling 755a633 on folderSymbolicLink into f58fb99 on develop.

@@ -154,14 +154,16 @@ std::vector<Item> browse(
// It's a sequence of directories, so it's not a sequence.
BOOST_FOREACH( Time t, s.getFramesIterable() )
{
output.push_back( Item( getTypeFromPath(directory / s.getFilenameAt(t)), directory / s.getFilenameAt(t) ) );
boost::filesystem::path folderPath = directory / s.getFilenameAt(t);
Copy link
Collaborator

Choose a reason for hiding this comment

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

⚠️ indentation :)

@coveralls
Copy link

coveralls commented Nov 7, 2016

Coverage Status

Coverage increased (+0.03%) to 63.182% when pulling c0a970e on folderSymbolicLink into f58fb99 on develop.

@cchampet cchampet merged commit c4bda3b into develop Nov 7, 2016
@mguiral mguiral deleted the folderSymbolicLink branch November 10, 2016 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants