-
Notifications
You must be signed in to change notification settings - Fork 16
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
exact match & wildcard test case issue resolution/updation #45
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.
did cosmetic change as suggested by reviewer. no impact on functionality
@amarsri28 please rebase this branch |
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.
+1 (LGTM)
Note: assertEquals
was deprecated and assertEqual
has to be used instead
#def test_wildcardmatch_selfconfig(self): | ||
# "make sure get_initial_arg and [gs]et_runtime_config work" | ||
# iconf = { | ||
# 'fields': [{'attr_name': 'babylon5', 'num_bytes': 2}, | ||
# {'offset': 10, 'num_bytes': 1}] | ||
# } | ||
# wm = WildcardMatch(**iconf) | ||
# # workers are all paused, we never run them here | ||
# m1 = vstring([0xff, 0xf0], [0x7f]) | ||
# v1 = vstring([0x88, 0x80], [0x03]) | ||
# wm.add(gate=1, priority=1, masks=m1, values=v1) | ||
# m2 = vstring([0xf0, 0xff], [0x3f]) | ||
# v2 = vstring([0x70, 0x70], [0x05]) | ||
# wm.add(gate=2, priority=2, masks=m2, values=v2) | ||
# wm.set_default_gate(gate=3) | ||
# # Delivered config is sorted by priority, then gate, then mask, | ||
# # then values. Since we use a different priority for each we can | ||
# # just sort by priority here. | ||
# expect_config = { | ||
# 'default_gate': 3, | ||
# 'rules': [ | ||
# {'priority': 1, 'gate': 1, 'masks': m1, 'values': v1}, | ||
# {'priority': 2, 'gate': 2, 'masks': m2, 'values': v2}, | ||
# ] | ||
# } | ||
# arg = pb_conv.protobuf_to_dict(wm.get_initial_arg()) | ||
# cur_config = pb_conv.protobuf_to_dict(wm.get_runtime_config()) |
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.
@amarsri28, please open an issue about this so we keep track of it. Thanks!
This Pr will enable test cases for exact-match & Wildcard. one common test case is still not working so it has been disabled for now.