python storage py -v Trying sc StorageController Expecting nothing ok

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
$ python storage.py -v
Trying:
sc = StorageController()
Expecting nothing
ok
Trying:
sc.has_storage('sid1')
Expecting:
False
**********************************************************************
File "storage.py", line 4, in __main__
Failed example:
sc.has_storage('sid1')
Expected:
False
Got:
False
Trying:
s1 = sc('sid1') # default storage engine
Expecting nothing
ok
Trying:
sc.has_storage('sid1')
Expecting:
True
ok
Trying:
sc.drop('sid1')
Expecting nothing
ok
Trying:
sc.has_storage('sid1')
Expecting:
False
ok
Trying:
s2 = sc('sid2', storage='DictStorage')
Expecting nothing
ok
Trying:
s2.has_key('key1')
Expecting:
False
**********************************************************************
File "storage.py", line 16, in __main__
Failed example:
s2.has_key('key1')
Expected:
False
Got:
False
Trying:
s2['key1'] = 'value1'
Expecting nothing
ok
Trying:
s2['key1']
Expecting:
'value1'
ok
Trying:
s2.has_key('key1')
Expecting:
True
ok
Trying:
s2_clone = sc('sid2')
Expecting nothing
ok
Trying:
s2_clone['key1']
Expecting:
'value1'
ok
Trying:
s2['bad value']
Expecting:
Traceback (most recent call last):
...
KeyError: 'bad value'
ok
22 items had no tests:
__main__.AbstractStorage
__main__.AbstractStorage.__getitem__
__main__.AbstractStorage.__init__
__main__.AbstractStorage.__setitem__
__main__.AbstractStorage.delete
__main__.AbstractStorage.get
__main__.AbstractStorage.has_key
__main__.AbstractStorage.set
__main__.AbstractStorage.terminate
__main__.DictStorage
__main__.DictStorage.__init__
__main__.DictStorage.delete
__main__.DictStorage.get
__main__.DictStorage.set
__main__.StorageController
__main__.StorageController.__call__
__main__.StorageController.__init__
__main__.StorageController.drop
__main__.StorageController.find_storage
__main__.StorageController.has_storage
__main__.StorageError
__main__.main
**********************************************************************
1 items had failures:
2 of 14 in __main__
14 tests in 23 items.
12 passed and 2 failed.
***Test Failed*** 2 failures.