Comments (9)
OK this passed on the second run, but it's still an issue for the first run. I suppose the focus of this bug should be on that instead.
Secondary question: Is there really onlt 61 unit tests for this whole codebase? Running
git ls-files | grep -e 'py$' | egrep -v test | egrep -v setup | xargs wc -l
yields 12981 lines of code. 61 unit tests?
from apitools.
I ran
$ nosetests -v --collect-only
...
...
----------------------------------------------------------------------
Ran 61 tests in 0.538s
OK
and grouped the output together:
apitools.base.py.base_api_test
BaseApiTest.testAdditionalHeaders
BaseApiTest.testIncludeEmptyFieldsClient
BaseApiTest.testJsonResponse
BaseApiTest.testNoCredentials
BaseApiTest.testPathRemapping
BaseApiTest.testPrettyPrintEncoding
BaseApiTest.testQueryEncoding
BaseApiTest.testQueryRemapping
BaseApiTest.testUrlNormalization
apitools.base.py.http_wrapper_test
HttpWrapperTest.testRequestBodyUsesLengthProperty
HttpWrapperTest.testRequestBodyWithLen
apitools.base.py.credentials_lib_test
CredentialsLibTest.testGceServiceAccounts
apitools.base.py.util_test
UtilTest.testAcceptableMimeType
UtilTest.testCalculateWaitForRetry
UtilTest.testExpand
UtilTest.testMapParamNames
UtilTest.testMapRequestParams
UtilTest.testReservedExpansion
UtilTest.testTypecheck
UtilTest.testUnsupportedMimeType
apitools.base.py.extra_types_test
ExtraTypesTest.testArrayAsValue
ExtraTypesTest.testArrayEncoding
ExtraTypesTest.testDateField
ExtraTypesTest.testDictEncoding
ExtraTypesTest.testInt64
ExtraTypesTest.testInvalidProtos
ExtraTypesTest.testJsonNumberEncoding
ExtraTypesTest.testJsonObjectPropertyTranslation
ExtraTypesTest.testNullEncoding
ExtraTypesTest.testObjectAsValue
apitools.gen.client_generation_test
ClientGenerationTest.testGeneration
apitools.base.py.stream_slice_test
StreamSliceTest.testEmptySlice
StreamSliceTest.testOffsetStream
StreamSliceTest.testSimpleSlice
StreamSliceTest.testTooShortStream
apitools.base.py.transfer_test
TransferTest.testFromEncoding
apitools.base.py.encoding_test
EncodingTest.testAdditionalMessageProperties
EncodingTest.testAdditionalPropertyMapping
EncodingTest.testBytesEncoding
EncodingTest.testCopyProtoMessage
EncodingTest.testEnumRemapping
EncodingTest.testFieldRemapping
EncodingTest.testIgnoredEnums
EncodingTest.testIgnoredEnumsWithDefaults
EncodingTest.testIncludeFields
EncodingTest.testJsonDatetime
EncodingTest.testMessageToRepr
EncodingTest.testMessageToReprWithTime
EncodingTest.testMultipleRemapping
EncodingTest.testNestedFieldMapping
EncodingTest.testNestedIncludeFields
EncodingTest.testNoRepeatedRemapping
EncodingTest.testRepeatedEnumRemapping
EncodingTest.testRepeatedFieldRemapping
EncodingTest.testUnknownNestedRoundtrip
EncodingTest.testValidEnums
apitools.base.py.buffered_stream_test
BufferedStreamTest.testArbitraryLengthRead
BufferedStreamTest.testEmptyBuffer
BufferedStreamTest.testExhaustedStream
BufferedStreamTest.testOffsetStream
BufferedStreamTest.testUnexhaustedStream
from apitools.
Classifying these by file, we see the two test files missing:
samples/storage_sample/downloads_test.py
samples/storage_sample/uploads_test.py
from apitools.
so there are a few things going on in this thread:
- i can't repro the
tox
failure. the failing test requires network access, which is all kinds of dirty -- but the failure here seems to be something else entirely. can we confirm that it's failing to findgen_client
itself? is there anything else further up in the log that looks fishy? - test coverage is fishy in part because i haven't yet gotten all of the internal tests untangled enough to run externally. low coverage numbers on a shield in readme will hopefully be good motivation. 😄
- much of the test coverage here is in the form of integration tests, not unit tests -- lots of experience shows that trying to mock out either (1) the discovery docs or (2) server behavior only gives a false sense of security. i think this means i'll ultimately need to wire up the coveralls reporting to tests that use a service account in travis.
from apitools.
@craigcitro Here is the entire output of a fresh run:
https://gist.github.com/dhermes/9c64db03dd0cc01e852b
We (gcloud-python
) use a service account in our regression/system tests, but our unit tests are very fast because we don't have any file I/O and don't have any network I/O.
from apitools.
yeah, so we're going to drop this from the unit tests -- but i'd still love to know exactly what's failing there.
you down with me sending you an extra patch with some debugging print statements to rerun with?
from apitools.
Yes, very much so.
from apitools.
https://github.com/craigcitro/apitools/tree/morelogging has some extra logging, so we can at least confirm why we're failing.
from apitools.
Running morelogging
didn't really log much else: https://gist.github.com/dhermes/74b64447970b9957834e
from apitools.
Related Issues (20)
- some files still using python2-specific print statements
- Uncaught AttributeError during decode
- New pycodestyle version (2.4.0) causing CI runs to fail due to lint errors. HOT 1
- Releases could be improved
- Support Python 3 HOT 7
- Importing from apitools.base.py submodules is slow
- Python 3.3 Travis tests always fail HOT 1
- Travis Python tests are flaky HOT 1
- Update auth URIs that have new oauth2.googleapis.com equivalents
- TravisCI tests began failing at some commit after v0.5.24 HOT 1
- Python 3 incompatible in batch request
- Upload.RefreshResumableUploadState seeks to beginning of stream on OK, CREATED HOT 7
- Unknown values in repeated enums cause crash
- class apitools.base.protorpclite.messages.Message is unhashable in Python 3
- Cloud Endpoints, python, UnboundLocalError: local variable 'scope_spec' referenced before assignment HOT 2
- Importing ABC from collections module directly was removed in Python 3.9
- crash from monotonic depending upon ctypes HOT 3
- Support `requests` in apitools
- Sensitive details removed HOT 1
- Cannot continue with apitools
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apitools.