From b6a9290559d3a5caff4d1f8b4b9daf6ebfab0429 Mon Sep 17 00:00:00 2001 From: kush789 Date: Thu, 11 Feb 2016 02:49:07 +0530 Subject: [PATCH 1/2] Updated expected_files hook to allow passing a function to generate expected fs. --- testenv/conf/expected_files.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testenv/conf/expected_files.py b/testenv/conf/expected_files.py index 5362771..c9a333f 100644 --- a/testenv/conf/expected_files.py +++ b/testenv/conf/expected_files.py @@ -17,7 +17,10 @@ files are found, else returns gracefully. @hook() class ExpectedFiles: def __init__(self, expected_fs): - self.expected_fs = expected_fs + if callable(expected_fs): + self.expected_fs = expected_fs() + else: + self.expected_fs = expected_fs @staticmethod def gen_local_fs_snapshot(): -- 1.9.1