Changeset 1908:218bed8ed75f


Ignore:
Timestamp:
Jan 3, 2020, 6:57:45 PM (3 months ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Check that cache wasn't used

This is the "fix" for ticket #126. It turned out that
`StatCache.__setitem__` contains a test whether the cache is enabled
and if not, doesn't put anything into the cache.
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ftputil/stat.py

    r1907 r1908  
    619619                continue
    620620            loop_path = self._path.join(path, stat_result._st_name)
     621            # No-op if cache is disabled.
    621622            cache[loop_path] = stat_result
    622623            yield stat_result
  • test/test_stat.py

    r1906 r1908  
    10651065            for name in expected_names:
    10661066                assert name in remote_file_list
     1067            assert len(host.stat_cache) == 0
Note: See TracChangeset for help on using the changeset viewer.