Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .is_closed() for FakeSnowflakeConnection #125

Closed
ilietrasca opened this issue Aug 19, 2024 · 1 comment · Fixed by #126
Closed

Add .is_closed() for FakeSnowflakeConnection #125

ilietrasca opened this issue Aug 19, 2024 · 1 comment · Fixed by #126

Comments

@ilietrasca
Copy link

If someone want to use write some code where is reusing connection the FakeSnowflakeConnection is causing problems because dose not have the is_closed check which is an easy to add feature.

@ilietrasca
Copy link
Author

ilietrasca commented Aug 19, 2024

I tried to follow that instructions for local dev, but the format is not working and for a small change I'm formatting the entire file, anyway.

The if someone can change FakeSnowflakeConnection:

    def is_closed(self) -> bool:
        return self._duck_conn is None

And test, the connection can will always be true, but like this will help replicating SnowflakeConnection :

def test_is_closed_present(conn: snowflake.connector.SnowflakeConnection):
    assert conn.is_closed() is False

tekumara pushed a commit that referenced this issue Aug 20, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.9.23](v0.9.22...v0.9.23)
(2024-08-20)


### Features

* **server:** support bool, int, float types
([efd4942](efd4942))
* **server:** support cur.description
([6e9c1a5](6e9c1a5))
* support conn.is_closed()
([36dd461](36dd461)),
closes [#125](#125)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: potatobot-prime[bot] <132267321+potatobot-prime[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant