2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-09-05 08:45:22 +00:00

Remove Python 2 support.

This commit is contained in:
Mark Grassi
2022-06-28 21:08:50 -04:00
parent 43f419458e
commit df97cf89bd
37 changed files with 146 additions and 319 deletions

View File

@@ -15,7 +15,6 @@ from common_test import read_file, write_file
import os
import shutil
import sys
import apparmor.aa # needed to set global vars in some tests
from apparmor.aa import (check_for_apparmor, get_output, get_reqs, get_interpreter_and_abstraction, create_new_profile,
@@ -99,14 +98,7 @@ class AATest_get_reqs(AATest):
)
def _run_test(self, params, expected):
# for some reason, setting the ldd config option does not get
# honored in python2.7
# XXX KILL when python 2.7 is dropped XXX
if sys.version_info[0] < 3:
print("Skipping on python < 3.x")
return
apparmor.aa.cfg['settings']['ldd'] = './fake_ldd'
self.assertEqual(get_reqs(params), expected)
class AaTest_create_new_profile(AATest):
@@ -118,12 +110,6 @@ class AaTest_create_new_profile(AATest):
)
def _run_test(self, params, expected):
apparmor.aa.cfg['settings']['ldd'] = './fake_ldd'
# for some reason, setting the ldd config option does not get
# honored in python2.7
# XXX KILL when python 2.7 is dropped XXX
if sys.version_info[0] < 3:
print("Skipping on python < 3.x")
return
self.createTmpdir()