|
2 | 2 |
|
3 | 3 | FILE = __file__.rsplit(".", 1)[0] + ".env"
|
4 | 4 |
|
5 |
| -print("e0", dotenv.get_key(FILE, "e0")) |
6 |
| -print("e1", dotenv.get_key(FILE, "e1")) |
7 |
| -print("e2", dotenv.get_key(FILE, "e2")) |
8 |
| -print("e3", dotenv.get_key(FILE, "e3")) |
9 |
| -print("e4", dotenv.get_key(FILE, "e4")) |
10 |
| -print("e5", dotenv.get_key(FILE, "e5")) |
11 |
| -print("e6", dotenv.get_key(FILE, "e6")) |
12 |
| -print("e7", dotenv.get_key(FILE, "e7")) |
13 |
| -print("e8", dotenv.get_key(FILE, "e8")) |
14 |
| -print("e9", dotenv.get_key(FILE, "e9")) |
15 |
| -print("e10", dotenv.get_key(FILE, "e10")) |
16 |
| -print("e11", dotenv.get_key(FILE, "e11")) |
17 |
| -print("e12", dotenv.get_key(FILE, "e12")) |
18 |
| -print("e13", dotenv.get_key(FILE, "e13")) |
19 |
| -print("e14", dotenv.get_key(FILE, "e14")) |
20 |
| -# print("e15", dotenv.get_key(FILE, "e15")) |
21 |
| -print("e16", dotenv.get_key(FILE, "e16")) |
22 |
| -print("e17", dotenv.get_key(FILE, "e17")) |
23 |
| -print("e18", dotenv.get_key(FILE, "e18")) |
| 5 | +print(f"notpresent={dotenv.get_key(FILE, 'notpresent')}") |
| 6 | +print(f"plain_value={dotenv.get_key(FILE, 'plain_value')}") |
| 7 | +print(f"value_with_comment={dotenv.get_key(FILE, 'value_with_comment')}") |
| 8 | +print(f"quoted_value={dotenv.get_key(FILE, 'quoted_value')}") |
| 9 | +print(f"quoted_value_with_comment={dotenv.get_key(FILE, 'quoted_value_with_comment')}") |
| 10 | +print(f"should_be_none={dotenv.get_key(FILE, 'should_be_none')}") |
| 11 | +print(f"should_be_empty_string={dotenv.get_key(FILE, 'should_be_empty_string')}") |
| 12 | +print(f"should_be_hash={dotenv.get_key(FILE, 'should_be_hash')}") |
| 13 | +print(f"quoted_should_be_empty_string={dotenv.get_key(FILE, 'quoted_should_be_empty_string')}") |
| 14 | +print(f"duplicate_key={dotenv.get_key(FILE, 'duplicate_key')}") |
| 15 | +### This is the a difference from CPython dotenv. The trailing #value is taken as a comment. |
| 16 | +print(f"value_with_hash={dotenv.get_key(FILE, 'value_with_hash')}") |
| 17 | +print(f"quoted_value_with_hash={dotenv.get_key(FILE, 'quoted_value_with_hash')}") |
| 18 | +print(f"multi_line_value={dotenv.get_key(FILE, 'multi_line_value')}") |
| 19 | +print(f"space_before_key={dotenv.get_key(FILE, 'space_before_key')}") |
| 20 | +print(f"space_before_value={dotenv.get_key(FILE, 'space_before_value')}") |
| 21 | +print(f"space_before_hash_value={dotenv.get_key(FILE, 'space_before_hash_value')}") |
| 22 | +print(f"space_after_key={dotenv.get_key(FILE, 'space_after_key')}") |
| 23 | +print(f"space_after_key_before_value={dotenv.get_key(FILE, 'space_after_key_before_value')}") |
| 24 | +print(f"quoted_then_comment={dotenv.get_key(FILE, 'quoted_then_comment')}") |
| 25 | +print(f"hash_with_spaces={dotenv.get_key(FILE, 'hash_with_spaces')}") |
0 commit comments