Skip to content

Commit 439fd39

Browse files
aniketpaluntkathole
authored andcommitted
Minor code reformatting
Signed-off-by: Aniket Paluskar <[email protected]>
1 parent 55209bc commit 439fd39

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

sdk/python/tests/unit/online_store/test_online_writes.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import asyncio
1516
import os
17+
import shutil
1618
import tempfile
1719
import unittest
1820
import warnings
1921
from datetime import datetime, timedelta
2022
from typing import Any
2123

2224
import pandas as pd
25+
import pytest
2326

2427
from feast import (
2528
Entity,
@@ -205,8 +208,6 @@ def setUp(self):
205208
self.store.apply([driver, driver_stats_source, driver_stats_fv])
206209

207210
def tearDown(self):
208-
import shutil
209-
210211
shutil.rmtree(self.data_dir)
211212

212213
def test_empty_dataframe_warns(self):
@@ -231,7 +232,6 @@ def test_empty_dataframe_warns(self):
231232

232233
def test_empty_dataframe_async_warns(self):
233234
"""Test that completely empty dataframe warns instead of raising error in async version"""
234-
import asyncio
235235

236236
async def test_async_empty():
237237
empty_df = pd.DataFrame()
@@ -287,7 +287,6 @@ def test_dataframe_with_empty_feature_columns_warns(self):
287287

288288
def test_dataframe_with_empty_feature_columns_async_warns(self):
289289
"""Test that dataframe with entity data but empty feature columns warns instead of raising error in async version"""
290-
import asyncio
291290

292291
async def test_async_empty_features():
293292
current_time = pd.Timestamp.now()
@@ -342,10 +341,6 @@ def test_valid_dataframe(self):
342341

343342
def test_valid_dataframe_async(self):
344343
"""Test that valid dataframe with feature data succeeds in async version"""
345-
import asyncio
346-
347-
import pytest
348-
349344
pytest.skip("Feature not implemented yet")
350345

351346
async def test_async_valid():
@@ -443,8 +438,6 @@ def test_inputs_dict_with_empty_features_warns(self):
443438

444439
def test_multiple_feature_views_materialization_with_empty_data(self):
445440
"""Test materializing multiple feature views where one has empty data - should not break materialization"""
446-
import tempfile
447-
from datetime import timedelta
448441

449442
with tempfile.TemporaryDirectory() as data_dir:
450443
# Create a new store for this test
@@ -525,10 +518,10 @@ def test_multiple_feature_views_materialization_with_empty_data(self):
525518
entity_key: pd.Series([], dtype="int64"),
526519
"event_timestamp": pd.Series(
527520
[], dtype="datetime64[ns, UTC]"
528-
), # Timezone-aware
521+
), # Timezone-aware
529522
"created": pd.Series(
530523
[], dtype="datetime64[ns, UTC]"
531-
), # Timezone-aware
524+
), # Timezone-aware
532525
f"feature_{i + 1}_rate": pd.Series([], dtype="float32"),
533526
f"feature_{i + 1}_count": pd.Series([], dtype="int64"),
534527
}

0 commit comments

Comments
 (0)