Giter Club home page Giter Club logo

Comments (6)

jdavies-st avatar jdavies-st commented on June 19, 2024 1

The test was removed in #979.

from asdf.

drdavella avatar drdavella commented on June 19, 2024

I have seen this issue as well. It only seems to occur when running in a python-2.7 environment.

from asdf.

drdavella avatar drdavella commented on June 19, 2024

Since we are removing support for Py2, maybe this can be closed.

from asdf.

drdavella avatar drdavella commented on June 19, 2024

Closing since Py2 is no longer supported. Will reopen if the issue reappears.

from asdf.

jdavies-st avatar jdavies-st commented on June 19, 2024

Reopening this as I see this failure locally when running under MacOS and Python 3.9. Seems to pass fine on Travis. Clearly, the test is flaky.

$ pytest asdf/tests/test_generic_io.py::test_http_connection_range --remote-data -v
================================================== test session starts ==================================================
platform darwin -- Python 3.9.0, pytest-6.1.2, py-1.9.0, pluggy-0.13.1 -- /Users/jdavies/miniconda3/envs/asdf/bin/python
cachedir: .pytest_cache
rootdir: /Users/jdavies/dev/asdf, configfile: setup.cfg
plugins: doctestplus-0.8.0, remotedata-0.3.2, openfiles-0.5.0, asdf-2.8.0.dev103+g89947dd.d20201112
collected 2 items                                                                                                       

asdf/tests/test_generic_io.py::test_http_connection_range[create_small_tree] PASSED                               [ 50%]
asdf/tests/test_generic_io.py::test_http_connection_range[create_large_tree] FAILED                               [100%]

======================================================= FAILURES ========================================================
_____________________________________ test_http_connection_range[create_large_tree] _____________________________________

tree = {'more': array([[[0.46697203, 0.26663249, 0.31253938, ..., 0.42559718,
         0.05273264, 0.19073801],
        [0.61...1,
        0.08548561],
       [0.20447504, 0.64278415, 0.44272929, ..., 0.53209797, 0.99239067,
        0.73564929]])}
rhttpserver = <asdf.tests.httpserver.RangeHTTPServer object at 0x7f8b08477250>

    @pytest.mark.remote_data
    def test_http_connection_range(tree, rhttpserver):
        path = os.path.join(rhttpserver.tmpdir, 'test.asdf')
        connection = [None]
    
        def get_write_fd():
            return generic_io.get_file(open(path, 'wb'), mode='w')
    
        def get_read_fd():
            fd = generic_io.get_file(rhttpserver.url + "test.asdf")
            assert isinstance(fd, generic_io.HTTPConnection)
            connection[0] = fd
            return fd
    
        with _roundtrip(tree, get_write_fd, get_read_fd) as ff:
            if len(tree) == 4:
                assert connection[0]._nreads == 0
            else:
>               assert connection[0]._nreads == 6
E               assert 5 == 6
E                 +5
E                 -6

asdf/tests/test_generic_io.py:296: AssertionError
------------------------------------------------- Captured stderr call --------------------------------------------------
127.0.0.1 - - [12/Nov/2020 15:20:58] "GET /test.asdf HTTP/1.1" 206 -
127.0.0.1 - - [12/Nov/2020 15:20:58] "GET /test.asdf HTTP/1.1" 206 -
127.0.0.1 - - [12/Nov/2020 15:20:58] "GET /test.asdf HTTP/1.1" 206 -
127.0.0.1 - - [12/Nov/2020 15:20:58] "GET /test.asdf HTTP/1.1" 206 -
127.0.0.1 - - [12/Nov/2020 15:20:58] "GET /test.asdf HTTP/1.1" 206 -
127.0.0.1 - - [12/Nov/2020 15:20:58] "GET /test.asdf HTTP/1.1" 206 -
================================================ short test summary info ================================================
FAILED asdf/tests/test_generic_io.py::test_http_connection_range[create_large_tree] - assert 5 == 6
============================================== 1 failed, 1 passed in 0.87s ==============================================

from asdf.

braingram avatar braingram commented on June 19, 2024

Closing as it appears this test no longer exists.

from asdf.

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.