Skip to content
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

[Package dependency Error: PyYAML] TypeError: can't compare offset-naive and offset-aware datetimes #2397

Closed
xiangce opened this issue Jan 8, 2020 · 0 comments · Fixed by #2398
Assignees

Comments

@xiangce
Copy link
Contributor

xiangce commented Jan 8, 2020

The new version of PyYAML==5.3 is released, and due to new feature (here) in the new version, the pytest failed with:

_____________________________ test_oc_get_pod_yml ______________________________

    def test_oc_get_pod_yml():
        result = openshift_get.OcGetPod(context_wrap(OC_GET_POD))
        assert result.data['items'][0]['metadata']['annotations']['openshift.io/scc'] == 'anyuid'
>       assert result.data['items'][0]['metadata']['creationTimestamp'] == datetime.datetime(2017, 2, 10, 16, 33, 46)
E       TypeError: can't compare offset-naive and offset-aware datetimes

insights/parsers/tests/test_openshift_get.py:1562: TypeError
_____________________ test_oc_get_egressnetworkpolicy_yml ______________________
    def test_oc_get_egressnetworkpolicy_yml():
        result = openshift_get.OcGetEgressNetworkPolicy(context_wrap(OC_GET_EGRESS_NETWORK_POLICY))
        assert result.data['items'][0]['kind'] == 'EgressNetworkPolicy'
>       assert result.data['items'][0]['metadata']['creationTimestamp'] == datetime.datetime(2018, 1, 29, 3, 31, 59)
E       TypeError: can't compare offset-naive and offset-aware datetimes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant