TST: Fix pandas.io.stata imports in test_stata.py
State: closed

- [x] Fixes test failures introduced in #40069
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them



Labels:
name: Code Style
description: Code style, linting, code_checks

Comments:
great ping on green.
@jreback 1 failure in database tests but pretty sure that's not related to these changes - error is in `http.server` (`OSError: [Errno 98] Address already in use`). Other than that all green

<details>
<summary>Database CI Log:</summary>

```
 =================================== FAILURES ===================================
_ test_server_and_default_headers[GzippedJSONUserAgentResponder-read_json-34266-None] _
[gw0] linux -- Python 3.7.10 /usr/share/miniconda/envs/pandas-dev/bin/python

responder = <class 'pandas.tests.io.test_user_agent.GzippedJSONUserAgentResponder'>
read_method = <function read_json at 0x7f2e13fb2dd0>, port = 34266
parquet_engine = None

    @pytest.mark.parametrize(
        "responder, read_method, port, parquet_engine",
        [
            (CSVUserAgentResponder, pd.read_csv, 34259, None),
            pytest.param(
                JSONUserAgentResponder,
                pd.read_json,
                34260,
                None,
                marks=td.skip_array_manager_not_yet_implemented,
            ),
            (ParquetPyArrowUserAgentResponder, pd.read_parquet, 34261, "pyarrow"),
            (ParquetFastParquetUserAgentResponder, pd.read_parquet, 34262, "fastparquet"),
            (PickleUserAgentResponder, pd.read_pickle, 34263, None),
            (StataUserAgentResponder, pd.read_stata, 34264, None),
            (GzippedCSVUserAgentResponder, pd.read_csv, 34265, None),
            pytest.param(
                GzippedJSONUserAgentResponder,
                pd.read_json,
                34266,
                None,
                marks=td.skip_array_manager_not_yet_implemented,
            ),
        ],
    )
    def test_server_and_default_headers(responder, read_method, port, parquet_engine):
        if parquet_engine is not None:
            pytest.importorskip(parquet_engine)
            if parquet_engine == "fastparquet":
                pytest.importorskip("fsspec")
    
>       with http.server.HTTPServer(("localhost", port), responder) as server:

pandas/tests/io/test_user_agent.py:212: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/share/miniconda/envs/pandas-dev/lib/python3.7/socketserver.py:452: in __init__
    self.server_bind()
/usr/share/miniconda/envs/pandas-dev/lib/python3.7/http/server.py:137: in server_bind
    socketserver.TCPServer.server_bind(self)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <http.server.HTTPServer object at 0x7f2d78060f50>

    def server_bind(self):
        """Called by constructor to bind the socket.
    
        May be overridden.
    
        """
        if self.allow_reuse_address:
            self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
>       self.socket.bind(self.server_address)
E       OSError: [Errno 98] Address already in use

/usr/share/miniconda/envs/pandas-dev/lib/python3.7/socketserver.py:466: OSError
```
</details>
LGTM
thanks @AA-Turner 
Thanks Jeff!
Thanks @rhshadrach and @AA-Turner for picking up on this and fixing it quickly, and I'm sorry for not having picked up on it myself - looks like we need to wait for these to be completely green, will do that next time