Skip to content

Commit

Permalink
docs: Fix linting issues to satisfy CI checks
Browse files Browse the repository at this point in the history
  • Loading branch information
shanto268 committed Nov 18, 2024
1 parent 566918c commit a87652e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ def __init__(self, parent: QtWidgets.QWidget):
parent (QWidget): Parent widget
"""
QTableView.__init__(self, parent)
QWidget_PlaceholderText.__init__(self, "No QComponents to show.\n\nCreate components from the QLibrary.", self)
QWidget_PlaceholderText.__init__(
self,
"No QComponents to show.\n\nCreate components from the QLibrary.",
self)

# Connect signals
self.clicked.connect(self.viewClicked)
Expand Down
23 changes: 11 additions & 12 deletions qiskit_metal/tests/run_all_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,33 @@
ERRORS_EXIST = 0

# Open log files
with open("test_results.log", "w") as results_log, open("test_errors.log", "w") as errors_log:
with open("test_results.log",
"w") as results_log, open("test_errors.log", "w") as errors_log:
for entry in LIST_OF_FILES:
if fnmatch.fnmatch(entry, PATTERN):
if entry != sys.argv[0]:
print(f"Running {entry} tests...")
results_log.write(f"Running {entry} tests...\n")

# Run the test and capture output
result = subprocess.run(
f"python {entry}",
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True
)

result = subprocess.run(f"python {entry}",
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True)

# Write the stdout and stderr to test_results.log
results_log.write(result.stdout)
results_log.write(result.stderr)
results_log.write("\n")

# If there's an error, write it to test_errors.log
if result.returncode != 0:
ERRORS_EXIST += 1
errors_log.write(f"Error in {entry}:\n")
errors_log.write(result.stderr)
errors_log.write("\n")

print("")

print("All tests complete")
Expand Down
2 changes: 2 additions & 0 deletions qiskit_metal/tests/test_toolbox_metal.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
from qiskit_metal.toolbox_metal.layer_stack_handler import LayerStackHandler

TEST_DATA = Path(__file__).parent / "test_data"


class TestToolboxMetal(unittest.TestCase, AssertionsMixin):
"""Unit test class."""

Expand Down

0 comments on commit a87652e

Please sign in to comment.