diff options
Diffstat (limited to 'games-util/sc-controller/files/sc-controller-0.4.8.9-python3_11.patch')
-rw-r--r-- | games-util/sc-controller/files/sc-controller-0.4.8.9-python3_11.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/games-util/sc-controller/files/sc-controller-0.4.8.9-python3_11.patch b/games-util/sc-controller/files/sc-controller-0.4.8.9-python3_11.patch new file mode 100644 index 000000000000..283dbba8be98 --- /dev/null +++ b/games-util/sc-controller/files/sc-controller-0.4.8.9-python3_11.patch @@ -0,0 +1,24 @@ +diff --git a/scc/lib/__init__.py b/scc/lib/__init__.py +index 33d1486dd..0fe3141a5 100644 +--- a/scc/lib/__init__.py ++++ b/scc/lib/__init__.py +@@ -1,3 +1,3 @@ + #!/usr/bin/env python2 + +-from enum import Enum, IntEnum, unique ++from .enum import Enum, IntEnum, unique +diff --git a/tests/test_strings/test_keys.py b/tests/test_strings/test_keys.py +new file mode 100644 +index 000000000..f118d373c +--- /dev/null ++++ b/tests/test_strings/test_keys.py +@@ -0,0 +1,8 @@ ++from scc.uinput import Keys ++from scc.lib import IntEnum ++ ++class TestKeys(object): ++ def test_up_str(self): ++ assert isinstance(Keys.KEY_UP, IntEnum) ++ assert Keys.KEY_UP.name == "KEY_UP" ++ assert str(Keys.KEY_UP) == "Keys.KEY_UP" +\ No newline at end of file |