Closed
Description
I'm seeing unit test failures with google-cloud-firestore under Python3.4, but not 2.x or 3.5+.
- OS type and version:
Debian 8
- Python version and virtual environment information
python --version
Python 3.4.2
- google-cloud-python version
pip show google-cloud
,pip show google-<service>
orpip 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
- 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
- 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')"
Metadata
Assignees
Labels
No labels