From b94f5fd361af6255ad4d3c7a88b9a21868736dea Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Thu, 14 Jul 2016 16:20:27 +1200 Subject: 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. --- netlib/utils.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'netlib/utils.py') 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 -- cgit v1.2.3