This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
subscription_manager_stuff() | |
# Not needed as long as we do not catch BaseException later on | |
# except KeyboardInterrupt: | |
# raise | |
except KnownError: | |
self.set_result("NICE_ERROR_CODE", "ERROR", "Nice error message") | |
except (Exception, SystemExit) as e: | |
self.set_result("UNKNOWN_ERROR", "ERROR", "Unknown Error was returned: %s" % e) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/convert2rhel/unit_tests/actions/actions_test.py b/convert2rhel/unit_tests/actions/actions_test.py | |
index 8dbac8a..0716164 100644 | |
--- a/convert2rhel/unit_tests/actions/actions_test.py | |
+++ b/convert2rhel/unit_tests/actions/actions_test.py | |
@@ -584,6 +584,9 @@ def _gen_version(major, minor): | |
class TestEFIChecks(unittest.TestCase): | |
+ def setUp(self): | |
+ self.efi_check = actions.efi_check.EfiCheck() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# let's say we have a function "testing" which is decorated by "my_decorator" | |
import functools | |
def my_decorator(func): | |
@functools.wraps(func) | |
def wrapped(*args, **kwargs): | |
print("In real decorator") | |
print(func.__name__) | |
print(args) | |
print(kwargs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
no_arch_data = None | |
name = epoch = vresion = release = arch = None | |
for [....]: | |
# current arch is valid | |
if re.findall(".*(x86_64|s390x|i86|ppc64le|aarch64)$", str(nevra.arch)): | |
name = nevra.name | |
epoch = epoch or nevra.epoch | |
version = nevra.version | |
release = nevra.release | |
arch = nevra.arch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In your classroom, you have ten students that are born in a variety of months. | |
(1) Use sets or frozensets to tell if anyone was born in the summer. | |
(2) Use sets or frozensets to tell who was born when the school year is not in session. | |
The summer months are June, July, and August. | |
The ten students and their birthdays are: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given a list of numbers that I will give you, loop through the list and | |
if it is even, add two to it. If it is odd, multiply it by two. Then | |
return the new list of numbers to me to use in my program. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(1) | |
Write a small program that uses "string.format() to print a greeting card message to all the following people: | |
Toshio | |
Andrew | |
Rodolfo | |
(2) | |
Here is a snippet from a log file: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2.10.0a1 => 2.10 | |
================ | |
cisco.nso | |
community.digitalocean | |
community.docker | |
community.fortios | |
community.google | |
community.hashi_vault | |
community.hrobot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@snake.key_map("<c-p>", mode=snake.INSERT_MODE) | |
def toggle_gutters_insert(): | |
"""Turn the gutters off in insert mode to make mouse selection easier""" | |
line_no_value = snake.get_option('nu') | |
signcolumn_value = snake.get_option('signcolumn') | |
if signcolumn_value != 'no' or line_no_value != '0': | |
snake.set_option('signcolumn=no') | |
snake.set_option('nonumber') | |
else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@c2r-20220808100827 convert2rhel]# git diff | |
diff --git a/convert2rhel/unit_tests/conftest.py b/convert2rhel/unit_tests/conftest.py | |
index d608201..3652831 100644 | |
--- a/convert2rhel/unit_tests/conftest.py | |
+++ b/convert2rhel/unit_tests/conftest.py | |
@@ -118,7 +118,11 @@ def system_cert_with_target_path(monkeypatch, tmpdir, request): | |
https://docs.pytest.org/en/7.1.x/how-to/fixtures.html#using-markers-to-pass-data-to-fixtures | |
""" | |
- mark = request.node.get_closest_marker("cert_filename") |