Skip to content

Commit 8f452bb

Browse files
authored
Merge pull request #20 from suaaa7/13_python_ci
Add unittest.skip and is_integer_dtype
2 parents 9a5d6c2 + 270749f commit 8f452bb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

python_ci/src/tests/test_df_service.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
from unittest import TestCase, main
1+
from unittest import TestCase, main, skip
22
from unittest.mock import patch
33

44
import pandas as pd
5+
from pandas.api.types import is_integer_dtype
56
from pandas.testing import assert_frame_equal
67

78
from src.df_service import DFService
@@ -72,6 +73,7 @@ def test_return_expected_df(self) -> None:
7273
})
7374
actual_df = self.service.swap_and_remove_path(self.test_df)
7475

76+
self.assertTrue(is_integer_dtype(actual_df['num']))
7577
assert_frame_equal(actual_df, expected_df)
7678
self.assertEqual(self.m_get_local_path.call_count, 3)
7779

@@ -93,9 +95,14 @@ def test_return_expected_df_when_get_local_path_return_none(self) -> None:
9395
})
9496
actual_df = self.service.swap_and_remove_path(self.test_df)
9597

98+
self.assertTrue(is_integer_dtype(actual_df['num']))
9699
assert_frame_equal(actual_df, expected_df)
97100
self.assertEqual(self.m_get_local_path.call_count, 3)
98101

102+
@skip('Use unittest.skip')
103+
def test_tmp(self) -> None:
104+
pass
105+
99106

100107
if __name__ == '__main__':
101108
main()

0 commit comments

Comments
 (0)