bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [PATCH 1/2] Replace variables before comparing expected f


From: Giuseppe Scrivano
Subject: Re: [Bug-wget] [PATCH 1/2] Replace variables before comparing expected files.
Date: Fri, 07 Aug 2015 08:26:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Jookia <address@hidden> writes:

> * expected_files.py: Use formatted_content instead of file.content.
> ---
>  testenv/conf/expected_files.py | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/testenv/conf/expected_files.py b/testenv/conf/expected_files.py
> index 2c8d632..5362771 100644
> --- a/testenv/conf/expected_files.py
> +++ b/testenv/conf/expected_files.py
> @@ -37,9 +37,10 @@ class ExpectedFiles:
>          for file in self.expected_fs:
>              if file.name in local_fs:
>                  local_file = local_fs.pop(file.name)
> -                if file.content != local_file['content']:
> +                formatted_content = test_obj._replace_substring(file.content)
> +                if formatted_content != local_file['content']:
>                      for line in unified_diff(local_file['content'],
> -                                             file.content,
> +                                             formatted_content,
>                                               fromfile='Actual',
>                                               tofile='Expected'):
>                          print(line, file=sys.stderr)

Thanks, going to push it soon.

Giuseppe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]