Skip to content

Commit 3235769

Browse files
committed
Added support for Python3.12
1 parent 30940ca commit 3235769

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/tinyscript/VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.30.14
1+
1.30.15

tests/test_features_handlers.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ def exec_script(handler, template):
5353
remove(FILE2)
5454
return out
5555
except IOError as e:
56-
print(str(e))
5756
pass
5857

5958

@@ -73,7 +72,9 @@ def test_disable_handlers(self):
7372

7473
def test_interrupt_handler(self):
7574
self.assertIs(at_interrupt(), None)
76-
#self._test_handler("interrupt")
75+
#FIXME: signals seem not to work anymore in Python 3.12
76+
if sys.version_info.major == 3 and sys.version_info.minor < 12:
77+
self._test_handler("interrupt")
7778
_hooks.sigint_action = "confirm"
7879
temp_stdout(self)
7980
temp_stdin(self, "\n")
@@ -101,7 +102,9 @@ def test_pause_handler(self):
101102

102103
def test_terminate_handler(self):
103104
self.assertIs(at_terminate(), None)
104-
#self._test_handler("terminate")
105+
#FIXME: signals seem not to work anymore in Python 3.12
106+
if sys.version_info.major == 3 and sys.version_info.minor < 12:
107+
self._test_handler("terminate")
105108

106109
def test_private_handlers(self):
107110
self.assertRaises(SystemExit, ih)

0 commit comments

Comments
 (0)