| commit 55: | efc16b08d349 |
| parent 54: | cddbaf73c3c5 |
| branch: | default |
| tags: | tip |
Added test for if we get a copy or a pointer from cache
Changed (Δ309 bytes):
raw changeset »
tests/test_end_to_end.py (15 lines added, 0 lines removed)
Up to file-list tests/test_end_to_end.py:
| … | … | @@ -105,3 +105,18 @@ def smoke_test_multi_search(): |
105 |
105 |
|
106 |
106 |
|
107 |
107 |
|
108 |
def test_cache_taint(): |
|
109 |
cache = {} |
|
110 |
m = Metadata(cache=cache) |
|
111 |
res1 = m.search_track("Trip back to childhood") |
|
112 |
||
113 |
assert len(cache) == 1 |
|
114 |
||
115 |
res2 = m.search_track("Trip back to childhood") |
|
116 |
||
117 |
assert res1 == res2 |
|
118 |
assert not res1 is res2 |
|
119 |
||
120 |
res2["bug"] = True |
|
121 |
||
122 |
assert not "bug" in res1 |
