-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JUnit XML output: Include timezone information in XML #33
Conversation
JUnit writes local-time without a timezone by default. This means that JUnit XML parsers default to local-time. The portal doesn't know what timezone the user of stbt-rig wants so these timestamps can be interpreted incorrectly. This change includes timezone information in the XML output. There is a small chance of incompatibilty caused by this change. If you experience this please get in contact at support@stb-tester.com.
97a332b
to
9b01331
Compare
Hmm, CI failed with:
Looks like a version locking issue. |
…8.04 To fix "AttributeError: module 'isort' has no attribute 'SortImports'".
Well, it looks like AppVeyor has caught an incompatibility with new versions of pytest:
I'm going to stop working on this now so back over to you @wmanley. |
b32be72
to
157bf61
Compare
Reproduced locally with:
|
917ece0
to
65d7932
Compare
65d7932
to
7e72a34
Compare
Now there are only pylint issues remaining:
This is a curious one. I think the Source: class Node(metaclass=NodeMeta):
...
@overload
def get_closest_marker(self, name: str) -> Optional[Mark]:
raise NotImplementedError()
@overload # noqa: F811
def get_closest_marker(self, name: str, default: Mark) -> Mark: # noqa: F811
raise NotImplementedError()
def get_closest_marker( # noqa: F811
self, name: str, default: Optional[Mark] = None
) -> Optional[Mark]:
"""return the first marker matching the name, from closest (for example function) to farther level (for example
module level).
:param default: fallback return value of no marker was found
:param name: name to filter by
"""
return next(self.iter_markers(name=name), default) So it's repeated in the function definition. The last definition will take precedence. Not sure why they've done this. |
Regarding I guess I'll just have to disable this lint :( |
Errors were: ``` ************* Module stbt_rig stbt_rig.py:1237:4: [W0223(abstract-method), StbtCollector] Method 'get_closest_marker' is abstract in class 'Node' but is not overridden stbt_rig.py:1237:4: [W0223(abstract-method), StbtCollector] Method 'gethookproxy' is abstract in class 'FSCollector' but is not overridden stbt_rig.py:1237:4: [W0223(abstract-method), StbtCollector] Method 'isinitpath' is abstract in class 'FSCollector' but is not overridden stbt_rig.py:1257:4: [W0223(abstract-method), StbtRemoteTest] Method 'get_closest_marker' is abstract in class 'Node' but is not overridden ``` The `get_closest_marker` is a pylint false positive because it's defined multiple times in `class Node`: ```python class Node(metaclass=NodeMeta): ... @overload def get_closest_marker(self, name: str) -> Optional[Mark]: raise NotImplementedError() @overload # noqa: F811 def get_closest_marker(self, name: str, default: Mark) -> Mark: # noqa: F811 raise NotImplementedError() def get_closest_marker( # noqa: F811 self, name: str, default: Optional[Mark] = None ) -> Optional[Mark]: """return the first marker matching the name, from closest (for example function) to farther level (for example module level). :param default: fallback return value of no marker was found :param name: name to filter by """ return next(self.iter_markers(name=name), default) ``` The other two don't need to be inherited because they'll never be called: pytest-dev/pytest#7591 . This is fixed in pytest 6.1: pytest-dev/pytest#7648
JUnit writes local-time without a timezone by default. This means that
JUnit XML parsers default to local-time. The portal doesn't know what
timezone the user of stbt-rig wants so these timestamps can be interpreted
incorrectly. This change includes timezone information in the XML output.
There is a small chance of incompatibility caused by this change. If you
experience this please get in contact at support@stb-tester.com.
TODO: