GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Firestore unit test failures under Python 3.4 (only) · Issue #4270 · googleapis/google-cloud-python

Firestore unit test failures under Python 3.4 (only) #4270

New issue
Copy link
New issue
Copy link
Closed
Closed
Firestore unit test failures under Python 3.4 (only)#4270
Copy link
Assignees
yoshi-automation

Description

@duggelz
duggelz
opened on Oct 26, 2017
Issue body actions

I'm seeing unit test failures with google-cloud-firestore under Python3.4, but not 2.x or 3.5+.

  1. OS type and version:
    Debian 8
  2. Python version and virtual environment information python --version
    Python 3.4.2
  3. google-cloud-python version pip show google-cloud, pip show google-<service> or pip freeze
cachetools==2.0.1
certifi==2017.7.27.1
chardet==3.0.4
coverage==4.4.1
dill==0.2.7.1
future==0.16.0
google-api-core==0.1.0
google-auth==1.1.1
google-cloud-core==0.27.1
-e git+https://github.com/GoogleCloudPlatform/google-cloud-python.git@854d904ed6ce56cd6f6fb26afb7381fc5ca40680#egg=google_cloud_firestore&subdirectory=firestore
google-gax==0.15.15
googleapis-common-protos==1.5.3
grpcio==1.4.0
idna==2.6
mock==2.0.0
pbr==3.1.1
ply==3.8
protobuf==3.4.0
py==1.4.34
pyasn1==0.3.7
pyasn1-modules==0.1.5
pytest==3.2.3
pytest-cov==2.5.1
requests==2.18.4
rsa==3.4.2
six==1.11.0
urllib3==1.22
  1. Stacktrace if available
# nox -f firestore/nox.py -e "unit_tests(python_version='3.4')"
nox > Running session unit_tests(python_version='3.4')
nox > /usr/bin/python -m virtualenv /home/vmagent/app/google-cloud-python/.nox/unit-3-4 -p python3.4
nox > chdir /home/vmagent/app/google-cloud-python/firestore
nox > pip install --upgrade mock pytest pytest-cov ../api_core ../core
nox > pip install --upgrade -e .
nox > py.test --quiet --cov=google.cloud.firestore --cov=google.cloud.firestore_v1beta1 --cov=tests.unit --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=97 tests/unit
....................................................F..........F............................................................................................................................................................................................................................................................................


Required test coverage of 97% reached. Total coverage: 100.00%
==================================================================================================== FAILURES =====================================================================================================
_________________________________________________________________________________________ Test_decode_value.test_datetime _________________________________________________________________________________________
Traceback (most recent call last):
  File "/home/vmagent/app/google-cloud-python/firestore/tests/unit/test__helpers.py", line 693, in test_datetime
    self.assertEqual(self._call_fut(value), expected_dt_val)
  File "/usr/lib/python3.4/unittest/case.py", line 797, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib/python3.4/unittest/case.py", line 790, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: datetime.datetime(1987, 7, 9, 18, 50, 6, 766961, tzinfo=<UTC>) != datetime.datetime(1987, 7, 9, 18, 50, 6, 766960, tzinfo=<UTC>)
________________________________________________________________________________________ Test_decode_dict.test_many_types _________________________________________________________________________________________
Traceback (most recent call last):
  File "/home/vmagent/app/google-cloud-python/firestore/tests/unit/test__helpers.py", line 865, in test_many_types
    self.assertEqual(self._call_fut(value_fields), expected)
  File "/usr/lib/python3.4/unittest/case.py", line 797, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib/python3.4/unittest/case.py", line 1088, in assertDictEqual
    self.fail(self._formatMessage(msg, standardMsg))
  File "/usr/lib/python3.4/unittest/case.py", line 642, in fail
    raise self.failureException(msg)
AssertionError: {'corge': '☃', 'bar': True, 'garply': ['for[185 chars]lse}} != {'garply': ['fork', 4.0], 'corge': '☃', 'ba[185 chars]lse}}
  {'bar': True,
   'baz': 981,
   'corge': '☃',
   'foo': None,
   'garply': ['fork', 4.0],
   'grault': b'\xe2\x98\x83',
   'quux': 2.875,
-  'quuz': datetime.datetime(2014, 3, 5, 16, 35, 50, 667285, tzinfo=<UTC>),
?                                                         ^

+  'quuz': datetime.datetime(2014, 3, 5, 16, 35, 50, 667284, tzinfo=<UTC>),
?                                                         ^

   'waldo': {'fred': 'zap', 'thud': False}}
2 failed, 330 passed in 3.81 seconds
  1. Steps to reproduce
docker run -it --entrypoint=/bin/bash gcr.io/google-appengine/python:latest
git clone --depth 1 https://github.com/GoogleCloudPlatform/google-cloud-python.git
cd google-cloud-python/
pip install --upgrade setuptools
pip install --upgrade nox-automation
nox -f firestore/nox.py -e "unit_tests(python_version='3.4')"

Activity

  1. duggelz commented on Oct 27, 2017

    @duggelz
    duggelz
    on Oct 27, 2017
    Author
    More actions

    Known bug in 3.4, fixed in 3.4.4: https://docs.python.org/3.4/whatsnew/changelog.html

    bpo-23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methods of datetime.datetime: microseconds are now rounded to nearest with ties going to nearest even integer (ROUND_HALF_EVEN), instead of being rounding towards zero (ROUND_DOWN). It’s important that these methods use the same rounding mode than datetime.timedelta to keep the property: (datetime(1970,1,1) + timedelta(seconds=t)) == datetime.utcfromtimestamp(t). It also the rounding mode used by round(float) for example.

  2. dhermes
    closed this as completedon Oct 27, 2017
  3. JustinBeckwith
    assigned
    yoshi-automation
    on Feb 1, 2021
  4. parthea
    added a commit that references this issue on Oct 21, 2023

    docs: add samples from tables/automl (#54)

    c829cc3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @yoshi-automation
    yoshi-automation

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.