Beispiel #1
0
import bear_matching

computed_result = bear_matching.matching_bears("small.dat")
expected_result = [('anna', 'bob')]

computed_result.sort()
expected_result.sort()
assert computed_result == expected_result
print "Successfully passed test1!"
Beispiel #2
0
import bear_matching

computed_result = bear_matching.matching_bears("medium-1.dat")
expected_result = [("pat", "jack the great"), ("deb", "jack the great")]

computed_result.sort()
expected_result.sort()

print computed_result

assert computed_result == expected_result
print "Successfully passed test2!"
Beispiel #3
0
import bear_matching

computed_result = bear_matching.matching_bears("back_slash.dat")
expected_result = [('pat', 'jack the great'), ('sety', 'art'), ('sety', 'jack the great')]
computed_result.sort()
expected_result.sort()

assert computed_result == expected_result
print "Successfully passed test6"
import sys
sys.path.append('C:\Users\Neerav Basant\Documents\GitHub\Data-Analytics-Programming\Week 2\Lab')

import bear_matching

computed_result = bear_matching.matching_bears("C:/Users/Neerav Basant/Documents/GitHub/Data-Analytics-Programming/Week 2/Lab/medium-2.dat")
expected_result = [("child2", "child1")]

computed_result.sort()
expected_result.sort()
assert computed_result == expected_result
print "Successfully passed test3!"
Beispiel #5
0
import bear_matching

computed_result = bear_matching.matching_bears("space.dat")
expected_result = [("child 2","child1"),("child2","chil d2"),("child2", "child1")]

computed_result.sort()
#print computed_result
expected_result.sort()

assert computed_result == expected_result
print "Successfully passed test4!"
Beispiel #6
0
import bear_matching

computed_result = bear_matching.matching_bears("exhaustive.dat")


expected_result = [('\\"\\n"', 'child3'), ('\\"\\n"', 'child5'), ('\\"\\n"', 'child7'), ('child2', 'abcdefghijklmnopqrstuvwxyz!@#$%^&*()_+1234567890-=?><"}{|,./;\'[]\\'), ('child2', 'child1'), ('child2', 'child7'), ('child4', 'child3'), ('child4', 'child7'), ('child6', 'abcdefghijklmnopqrstuvwxyz!@#$%^&*()_+1234567890-=?><"}{|,./;\'[]\\'), ('child6', 'child1')]
computed_result.sort()
#print computed_result
expected_result.sort()

assert computed_result == expected_result
print "Successfully passed test5!"
Beispiel #7
0
import bear_matching

computed_result = bear_matching.matching_bears("medium-2.dat")
expected_result = [("child2", "child1")]

computed_result.sort()
expected_result.sort()

assert computed_result == expected_result
print "Successfully passed test3!"