About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
See full specifications

linux default iconPyProxyFS Publisher's description

Simple filesystem abstraction

Simple filesystem abstraction

PyProxyFS is a proxy filesystem interface with a native filesystem implementation and a very simple test in-memory filesystem.

The aim of pyproxyfs is to provide a filesystem class that you can use for doing much of your file handling... but that can easi;ly be mocked for specific testing purposes.

If, instead of using open, os.rename and os.listdir you use the pyproxyfs equivalents you can expect to be able to make a simple filesystem using the builtin TestFS class and write tests around that.

For example:

def show_conf_files(dirtolist, filesystem=None):
from pyproxyfs import Filesystem
if not filesystem:
filesystem = Filesystem()
files = filesystem.listdir(dirtolist)
import re
cfgpat = re.compile(".*.cfg$")
cfg_files = [fn for fn in files if cfgpat.match(fn)]
return cfg_files

this might be your application code.

You could then test it relatively simply:

def test_show_conf_files():
>>> test_show_conf_files()
['a.cfg', 'b.cfg']
from pyproxyfs import TestFS
fs = TestFS({
"somedir/a.cfg": "",
"somedir/a.txt": "",
"somedir/b.cfg": "",
"somedir/run.py": ""
return show_conf_files("somedir", filesystem=fs)


System Requirements:

В· Python
Program Release Status: Minor Update
Program Install Support: Install and Uninstall

Is PyProxyFS your software?

Manage your software

Most Popular

linux default icon JOrg 0.93 RC
It's a software to help you control your files and their location.
linux default icon Android HTC 2.3
Android ported to the HTC Vogue, Kaiser, Polaris, and Nike.
linux default icon iReport Designer for JasperReports 4.0.2
iReport is the free, open source report designer for JasperReports.
linux default icon jGRASP 1.8.8_07 Beta
jGRASP is a lightweight development environment,.....
linux default icon Code::Blocks 10.05
A C/C++ IDE built with configurability and extensibility in mind

Related Category

» Archiving (73)
» Benchmarking (88)
» Other (3482)
» Printer (63)
» Shell Tools (113)