You have an answer that works for now, however you might want to consider that hard-coding the configfile's location relative to the module location is poor. Much better would be to have that as a default location and provide a mechanism, probably through an import() function, that allows for that location to be overridden. Then, you can use that mechanism within your tests.