Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unit tests for python 3.11 #4216

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ dist_check_SCRIPTS = $(srcdir)/glade_tests/*.py \
$(srcdir)/lib/*.sh \
unit_tests/unit_tests.sh \
rpm_tests/rpm_tests.sh \
pylint/runpylint.py \
cppcheck/runcppcheck.sh \
testenv.sh \
$(srcdir)/gettext_tests/*.py \
Expand All @@ -61,7 +60,6 @@ dist_check_SCRIPTS = $(srcdir)/glade_tests/*.py \


TESTS = unit_tests/unit_tests.sh \
pylint/runpylint.py \
cppcheck/runcppcheck.sh \
gettext_tests/click.py \
gettext_tests/style_guide.py \
Expand Down
16 changes: 8 additions & 8 deletions tests/unit_tests/pyanaconda_tests/test_payload_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@ class TestValues(enum.Enum):
broken_ftp = "ftp2://broken.server.com/test"

def map_to_classes(self):
if self == self.http:
if self == TestValues.http:
return HTTPSource
elif self == self.https:
elif self == TestValues.https:
return HTTPSSource
elif self == self.ftp:
elif self == TestValues.ftp:
return FTPSource
elif self in (self.nfs_ks, self.nfs_main_repo, self.nfs_main_repo2):
elif self in (TestValues.nfs_ks, TestValues.nfs_main_repo, TestValues.nfs_main_repo2):
return NFSSource
elif self == self.file:
elif self == TestValues.file:
return FileSource
elif self in (self.cdrom, self.cdrom_test):
elif self in (TestValues.cdrom, TestValues.cdrom_test):
return CDRomSource
elif self in (self.harddrive, self.harddrive_label, self.harddrive_uuid):
elif self in (TestValues.harddrive, TestValues.harddrive_label, TestValues.harddrive_uuid):
return HDDSource
elif self == self.hmc:
elif self == TestValues.hmc:
return HMCSource
else:
return None
Expand Down