Skip to content

Conversation

@johnmhoran
Copy link
Member

Signed-off-by: John M. Horan johnmhoran@gmail.com

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
assert new_files_to_visit == 0
assert old_files_to_visit == 0
assert new_files_visited == self.new.files_count
assert old_files_visited == self.old.files_count
Copy link
Contributor

Choose a reason for hiding this comment

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

For these assertion statements, we should add some custom text to make the assertion more clear. For example:

assert type(name) is StringType, "name is not a string: %r" % name

In this case "name is not a string: name" is printed if the data type of name is not a string.

We can adapt this to our code here by doing something like:

assert new_files_visited == self.new.files_count, "Number of visited files({})) does not match total_files({}) in the new scan".format(new_visited_files, self.new.files_count) 

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice idea. Coming shortly...

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
@steven-esser steven-esser merged commit a00a6d6 into develop Dec 8, 2017
@steven-esser steven-esser deleted the 28-increment-determine-delta-counter branch December 8, 2017 21:24
arnav-mandal1234 pushed a commit to arnav-mandal1234/deltacode that referenced this pull request Mar 16, 2023
Signed-off-by: Jono Yang <jyang@nexb.com>
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.

2 participants