diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2016-07-14 16:20:27 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2016-07-14 19:54:15 +1200 |
commit | b94f5fd361af6255ad4d3c7a88b9a21868736dea (patch) | |
tree | 5237bbd32c84d284a5c4b2478a9034f11d39a850 /netlib | |
parent | a6821aad8e9296640c3efd4275e8922dd7c6e43b (diff) | |
download | mitmproxy-b94f5fd361af6255ad4d3c7a88b9a21868736dea.tar.gz mitmproxy-b94f5fd361af6255ad4d3c7a88b9a21868736dea.tar.bz2 mitmproxy-b94f5fd361af6255ad4d3c7a88b9a21868736dea.zip |
Convert examples and example tests for new-style scripts
Remove the test that just loads all the example scripts for now - it's a very
low-value test, and we need to think of something better.
Diffstat (limited to 'netlib')
-rw-r--r-- | netlib/utils.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/netlib/utils.py b/netlib/utils.py index 23c16dc3..9eebf22c 100644 --- a/netlib/utils.py +++ b/netlib/utils.py @@ -56,6 +56,13 @@ class Data(object): dirname = os.path.dirname(inspect.getsourcefile(m)) self.dirname = os.path.abspath(dirname) + def push(self, subpath): + """ + Change the data object to a path relative to the module. + """ + self.dirname = os.path.join(self.dirname, subpath) + return self + def path(self, path): """ Returns a path to the package data housed at 'path' under this |