def test_search(self): directory = get_absolute_path('test_dir') ps = PanScanner([directory]) ps.search() self.assertEqual(ps._log, [ 'Found card number in %s:\n' % get_absolute_path('test_dir/deeper/contains.log'), '* Card number found at line 1 in interval: (28, 44)\n', '* Card number found at line 2 in interval: (16, 32), (57, 73)\n' ])