Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Commit

Permalink
add __version__ attribute to datafusion object (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
tfeda authored Jan 5, 2022
1 parent 5ad043e commit da792c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions datafusion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from abc import ABCMeta, abstractmethod
from typing import List

import importlib.metadata
import pyarrow as pa

from ._internal import (
Expand All @@ -29,6 +30,9 @@
)


__version__ = importlib.metadata.version("datafusion")


__all__ = [
"DataFrame",
"ExecutionContext",
Expand Down
4 changes: 4 additions & 0 deletions datafusion/tests/test_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ def test_import_datafusion():
assert datafusion.__name__ == "datafusion"


def test_datafusion_python_version():
assert datafusion.__version__ is not None


def test_class_module_is_datafusion():
for klass in [
ExecutionContext,
Expand Down

0 comments on commit da792c2

Please sign in to comment.