diff options
| author | omnom62 <75066712+omnom62@users.noreply.github.com> | 2025-10-19 21:07:22 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-19 07:07:22 -0400 |
| commit | 17cbfd4fc4cbf1efb81c18f3f24143f7c0acfa7c (patch) | |
| tree | 07d4ed14ea38aef0215386fcb41b055c122f53fd /tests/unit/mock/procenv.py | |
| parent | 79c844c2a58cd84671db78ee063f6b9b5fd942bb (diff) | |
| download | vyos.vyos-17cbfd4fc4cbf1efb81c18f3f24143f7c0acfa7c.tar.gz vyos.vyos-17cbfd4fc4cbf1efb81c18f3f24143f7c0acfa7c.zip | |
Fixes for sanity checks broken by upstream (#435)
* init for upstream sanity checks
* PY3 removed
* procenv.py PY3 fix
* changelog
* Bulk commit of linter changes
* Clean-up
Diffstat (limited to 'tests/unit/mock/procenv.py')
| -rw-r--r-- | tests/unit/mock/procenv.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/tests/unit/mock/procenv.py b/tests/unit/mock/procenv.py index d7f3dc95..d21e2a0e 100644 --- a/tests/unit/mock/procenv.py +++ b/tests/unit/mock/procenv.py @@ -29,7 +29,6 @@ from contextlib import contextmanager from io import BytesIO, StringIO from ansible.module_utils._text import to_bytes -from ansible.module_utils.six import PY3 from ansible_collections.vyos.vyos.tests.unit.compat import unittest @@ -42,11 +41,11 @@ def swap_stdin_and_argv(stdin_data="", argv_data=tuple()): real_stdin = sys.stdin real_argv = sys.argv - if PY3: - fake_stream = StringIO(stdin_data) - fake_stream.buffer = BytesIO(to_bytes(stdin_data)) - else: - fake_stream = BytesIO(to_bytes(stdin_data)) + # if PY3: + fake_stream = StringIO(stdin_data) + fake_stream.buffer = BytesIO(to_bytes(stdin_data)) + # else: + # fake_stream = BytesIO(to_bytes(stdin_data)) try: sys.stdin = fake_stream @@ -65,10 +64,10 @@ def swap_stdout(): """ old_stdout = sys.stdout - if PY3: - fake_stream = StringIO() - else: - fake_stream = BytesIO() + # if PY3: + fake_stream = StringIO() + # else: + # fake_stream = BytesIO() try: sys.stdout = fake_stream |
