Skip to content

Commit

Permalink
Merge pull request #155 from RahulARanger/fix-format-execution-error
Browse files Browse the repository at this point in the history
Fix format execution error
  • Loading branch information
RahulARanger authored Dec 18, 2024
2 parents 6aec84c + 1a9393d commit dc8e8b6
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"0": {"url": "https://api.github.com/repos/RahulARanger/handshake/releases/assets/178418674", "id": 178418674, "node_id": "RA_kwDOKgpJeM4KonPy", "name": "dashboard.tar.bz2", "label": "", "content_type": "application/x-bzip2", "state": "uploaded", "size": 797975, "download_count": 0, "created_at": "2024-07-08T21:02:09Z", "updated_at": "2024-07-08T21:02:10Z", "browser_download_url": "https://github.com/RahulARanger/handshake/releases/download/0.7.0/dashboard.tar.bz2"}, "version": "0.7.8"}
{"0": {"url": "https://api.github.com/repos/RahulARanger/handshake/releases/assets/178418674", "id": 178418674, "node_id": "RA_kwDOKgpJeM4KonPy", "name": "dashboard.tar.bz2", "label": "", "content_type": "application/x-bzip2", "state": "uploaded", "size": 797975, "download_count": 0, "created_at": "2024-07-08T21:02:09Z", "updated_at": "2024-07-08T21:02:10Z", "browser_download_url": "https://github.com/RahulARanger/handshake/releases/download/0.7.0/dashboard.tar.bz2"}, "version": "0.7.9"}
2 changes: 1 addition & 1 deletion handshake/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.7.8"
__version__ = "0.7.9"
5 changes: 2 additions & 3 deletions handshake/reporters/pytest_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from enum import StrEnum
from _pytest.fixtures import FixtureDef, FixtureValue, SubRequest
from _pytest.nodes import Node
from traceback import format_exception
from pathlib import Path


Expand Down Expand Up @@ -294,10 +293,10 @@ def note_fixture(self, fixturedef: FixtureDef[FixtureValue], request: SubRequest
case "class":
scope_desc = "Shared among tests in a class."

if fixturedef.cached_result[-1]:
if fixturedef.cached_result and fixturedef.cached_result[-1]:
note_desc = (
f"{request.fixturename}(scope: {request.scope}) failed to execute, "
f"because of this error: {format_exception(fixturedef.cached_result[-1][1])}"
f"because of this error: {repr(fixturedef.cached_result[-1][1])}"
)
else:
note_desc = f"{request.fixturename}(scope: {request.scope}) passed and it gave a result {str(fixturedef.cached_result[0])}"
Expand Down
2 changes: 1 addition & 1 deletion handshake/reporters/reporter.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from httpx import Client
from datetime import datetime
from subprocess import Popen
from typing import Union, Optional, Dict, Callable, List
from typing import Union, Optional, Dict, List
from loguru import logger
from time import sleep
from sys import stdout, stderr
Expand Down
22 changes: 11 additions & 11 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "handshakes"
version = "0.7.8"
version = "0.7.9"
description = "A service that's keen to process your test results"
authors = ["Rahul <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit dc8e8b6

Please sign in to comment.