1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-24 06:59:52 +01:00

fix replay_resolvers tests, don't use abs paths!

This commit is contained in:
Ilya Kreymer 2014-01-31 10:33:47 -08:00
parent 304ddbec84
commit bd94e3c656

View File

@ -76,12 +76,12 @@ def make_best_resolver(path):
RedisResolver('redis://myhost.example.com:1234/1') RedisResolver('redis://myhost.example.com:1234/1')
# a file # a file
>>> make_best_resolver('file://' + os.path.dirname(os.path.realpath(__file__)) + '/replay_resolvers.py') >>> class_name(make_best_resolver('file://' + os.path.realpath(__file__)))
PathIndexResolver('/home/ilya/workspace/pywb/pywb/replay_resolvers.py') 'PathIndexResolver'
# a dir # a dir
>>> make_best_resolver('file://' + os.path.dirname(os.path.realpath(__file__))) >>> class_name(make_best_resolver('file://' + os.path.dirname(os.path.realpath(__file__))))
PrefixResolver('/home/ilya/workspace/pywb/pywb') 'PrefixResolver'
""" """
@ -107,6 +107,9 @@ import utils
#================================================================= #=================================================================
if __name__ == "__main__" or utils.enable_doctests(): if __name__ == "__main__" or utils.enable_doctests():
def class_name(obj):
return obj.__class__.__name__
import doctest import doctest
doctest.testmod() doctest.testmod()