Last active
May 3, 2021 22:10
-
-
Save BryanCutler/e5a2b268f92f6fb858a67163dff2fd11 to your computer and use it in GitHub Desktop.
Text Extensions for Pandas: Tips and Techniques for Extending Pandas, Part 1 Blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@pytest.fixture | |
def dtype(): | |
""" Return dtype of your extension array.""" | |
return TensorDtype() | |
@pytest.fixture | |
def data(dtype): | |
""" Return an extension array as data for the tests.""" | |
return pd.array(np.array([[i] for i in range(100)]), dtype=dtype) | |
# Include other fixtures required by base tests. | |
class TestPandasInterface(base.BaseInterfaceTests): | |
""" Extend the base Interface tests to run them all.""" | |
pass | |
# Add more test classes as needed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment