

def test_updater_says_skip_cache(self):
    'Test the updater saying we need to update without relying\n        on the cache.\n        '

    class TestMemoryCache(MemoryCache):
        getc = 0

        def get(self, key):
            self.getc += 1
            return MemoryCache.get(self, key)
    self.env.cache = TestMemoryCache(100)
    self.create_files({
        'out': 'old_value',
    })
    self.updater.allow = SKIP_CACHE
    b = self.mkbundle('in1', output='out', filters=noop)
    b.build()
    assert (self.get('out') == 'A')
    assert (self.env.cache.getc == 0)
    self.updater.allow = True
    b.build()
    assert (self.env.cache.getc > 0)

dataset/ETHPy150Open miracle2k/webassets/tests/test_bundle_build.py TestAutoBuild.test_updater_says_skip_cache/original