Conditions | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
1 | # -*- coding: utf-8 -*- |
||
8 | def test_undefined_variable_to_str(): |
||
9 | undefined_var_error = exceptions.UndefinedVariableInTemplate( |
||
10 | 'Beautiful is better than ugly', |
||
11 | UndefinedError('Errors should never pass silently'), |
||
12 | {'cookiecutter': {'foo': 'bar'}} |
||
13 | ) |
||
14 | |||
15 | expected_str = ( |
||
16 | "Beautiful is better than ugly. " |
||
17 | "Error message: Errors should never pass silently. " |
||
18 | "Context: {'cookiecutter': {'foo': 'bar'}}" |
||
19 | ) |
||
20 | |||
21 | assert str(undefined_var_error) == expected_str |
||
22 |