Git Product home page Git Product logo

Comments (9)

dhermes avatar dhermes commented on May 3, 2024

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.

dhermes avatar dhermes commented on May 3, 2024

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.

dhermes avatar dhermes commented on May 3, 2024

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.

craigcitro avatar craigcitro commented on May 3, 2024

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 find gen_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.

dhermes avatar dhermes commented on May 3, 2024

@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.

craigcitro avatar craigcitro commented on May 3, 2024

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.

dhermes avatar dhermes commented on May 3, 2024

Yes, very much so.

from apitools.

craigcitro avatar craigcitro commented on May 3, 2024

https://github.com/craigcitro/apitools/tree/morelogging has some extra logging, so we can at least confirm why we're failing.

from apitools.

dhermes avatar dhermes commented on May 3, 2024

Running morelogging didn't really log much else: https://gist.github.com/dhermes/74b64447970b9957834e

from apitools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.