Skip to content

Commit 0182892

Browse files
author
PyCompiler ARK++
committed
revue des test et fix des error
1 parent 7223e2d commit 0182892

5 files changed

Lines changed: 12 additions & 70 deletions

File tree

Tests/test_workspace1/main.py

Lines changed: 5 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,8 @@
1-
# SPDX-License-Identifier: Apache-2.0
2-
# Copyright 2025 Ague Samuel Amen
3-
#
4-
# Licensed under the Apache License, Version 2.0 (the "License");
5-
# you may not use this file except in compliance with the License.
6-
# You may obtain a copy of the License at
7-
#
8-
# http://www.apache.org/licenses/LICENSE-2.0
9-
#
10-
# Unless required by applicable law or agreed to in writing, software
11-
# distributed under the License is distributed on an "AS IS" BASIS,
12-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
# See the License for the specific language governing permissions and
14-
# limitations under the License.
15-
16-
import sys
17-
from PySide6.QtWidgets import (
18-
QApplication,
19-
QWidget,
20-
QLabel,
21-
QLineEdit,
22-
QPushButton,
23-
QVBoxLayout,
24-
)
25-
26-
27-
class MaFenetre(QWidget):
28-
def __init__(self):
29-
super().__init__()
30-
31-
self.setWindowTitle("Mon App PySide6")
32-
self.setFixedSize(300, 200)
33-
34-
# Widgets
35-
self.label = QLabel("Entrez votre nom :")
36-
self.input = QLineEdit()
37-
self.button = QPushButton("Dire Bonjour")
38-
self.output_label = QLabel("")
39-
40-
# Layout
41-
layout = QVBoxLayout()
42-
layout.addWidget(self.label)
43-
layout.addWidget(self.input)
44-
layout.addWidget(self.button)
45-
layout.addWidget(self.output_label)
46-
self.setLayout(layout)
47-
48-
# Connexion du bouton
49-
self.button.clicked.connect(self.dire_bonjour)
50-
51-
def dire_bonjour(self):
52-
nom = self.input.text().strip()
53-
if nom:
54-
self.output_label.setText(f"Bonjour, {nom} !")
55-
else:
56-
self.output_label.setText("Veuillez entrer un nom.")
1+
#!/usr/bin/env python3
2+
# Test workspace entry point
573

4+
def run():
5+
return "main_ran"
586

597
if __name__ == "__main__":
60-
app = QApplication(sys.argv)
61-
fenetre = MaFenetre()
62-
fenetre.show()
63-
sys.exit(app.exec())
8+
print(run())
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
pyside6
1+
# Minimal requirements for test workspace
2+
# Intentionally light to avoid network installs during tests.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__all__ = ['module']
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"""Sample module for workspace tests."""
2+
3+
VALUE = 42

Tests/workspace_support.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,7 @@ def run():
8181
pkg_dir.mkdir(parents=True, exist_ok=True)
8282
(pkg_dir / "__init__.py").write_text("__all__ = ['module']\n", encoding="utf-8")
8383
(pkg_dir / "module.py").write_text(
84-
(
85-
"""
86-
"""Sample module for workspace tests."""
87-
88-
VALUE = 42
89-
90-
"""
91-
).strip()
92-
+ "\n",
84+
'"""Sample module for workspace tests."""\n\nVALUE = 42\n',
9385
encoding="utf-8",
9486
)
9587

0 commit comments

Comments
 (0)