Skip to content

Commit

Permalink
less localdata tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hadrilec committed Jan 5, 2025
1 parent 319541a commit 154d25e
Showing 1 changed file with 50 additions and 50 deletions.
100 changes: 50 additions & 50 deletions tests/localdata/test_pynsee_localdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@ def test_get_new_city(self):
test = True
df = get_new_city(code="24431", date="2018-01-01")
test = test & isinstance(df, pd.DataFrame)
df = get_new_city(code="24431")
test = test & isinstance(df, pd.DataFrame)
# df = get_new_city(code="24431")
# test = test & isinstance(df, pd.DataFrame)
self.assertTrue(test)

def test_get_area_projection1(self):
test = True
df = get_area_projection(
area="commune", code="01039", date="2020-01-01"
)
test = test & isinstance(df, pd.DataFrame)
test = test & (df.loc[0, "code"] == "01138")
self.assertTrue(test)
# def test_get_area_projection1(self):
# test = True
# df = get_area_projection(
# area="commune", code="01039", date="2020-01-01"
# )
# test = test & isinstance(df, pd.DataFrame)
# test = test & (df.loc[0, "code"] == "01138")
# self.assertTrue(test)

def test_get_area_projection2(self, test=True):

Expand All @@ -86,39 +86,39 @@ def test_get_area_projection2(self, test=True):
test = test & isinstance(df, pd.DataFrame) & (len(df.index) == 0)
self.assertTrue(test)

def test_get_area_projection3(self, test=True):
# def test_get_area_projection3(self, test=True):

df = get_area_projection(
area="commune",
code="01039",
date="2020-01-01",
dateProjection="2023-04-01",
)
test = test & isinstance(df, pd.DataFrame)
test = test & (df.loc[0, "code"] == "01138")
self.assertTrue(test)
# df = get_area_projection(
# area="commune",
# code="01039",
# date="2020-01-01",
# dateProjection="2023-04-01",
# )
# test = test & isinstance(df, pd.DataFrame)
# test = test & (df.loc[0, "code"] == "01138")
# self.assertTrue(test)

def test_get_area_projection4(self, test=True):
# def test_get_area_projection4(self, test=True):

df = get_area_projection(
area="commune",
code="01039",
date="2020-01-01",
dateProjection="2020-01-01",
)
test = test & isinstance(df, pd.DataFrame)
test = test & (df.loc[0, "code"] == "01039")
self.assertTrue(test)
# df = get_area_projection(
# area="commune",
# code="01039",
# date="2020-01-01",
# dateProjection="2020-01-01",
# )
# test = test & isinstance(df, pd.DataFrame)
# test = test & (df.loc[0, "code"] == "01039")
# self.assertTrue(test)

def test_get_area_projection5(self, test=True):
# def test_get_area_projection5(self, test=True):

df = get_area_projection(
area="departement",
code="01",
date="2020-01-01",
)
test = test & isinstance(df, pd.DataFrame)
self.assertTrue(test)
# df = get_area_projection(
# area="departement",
# code="01",
# date="2020-01-01",
# )
# test = test & isinstance(df, pd.DataFrame)
# self.assertTrue(test)

# def test_get_area_projection6(self, test=True):

Expand Down Expand Up @@ -170,14 +170,14 @@ def test_get_area_projection5(self, test=True):
# test = test & isinstance(df, pd.DataFrame)
# self.assertTrue(test)

def test_get_area_projection_dummy(self):
self.assertRaises(
ValueError,
get_area_projection,
"dummy",
"32",
"2020-01-01",
)
# def test_get_area_projection_dummy(self):
# self.assertRaises(
# ValueError,
# get_area_projection,
# "dummy",
# "32",
# "2020-01-01",
# )

def test_get_old_city(self):

Expand Down Expand Up @@ -388,11 +388,11 @@ def test_get_ascending_descending_area(self):
df = get_descending_area("departement", code="59")
test = test & isinstance(df, pd.DataFrame)

df = get_descending_area("zoneDEmploi2020", code="1109")
test = test & isinstance(df, pd.DataFrame)
# df = get_descending_area("zoneDEmploi2020", code="1109")
# test = test & isinstance(df, pd.DataFrame)

df = get_ascending_area("commune", code="59350", date="2018-01-01")
test = test & isinstance(df, pd.DataFrame)
# df = get_ascending_area("commune", code="59350", date="2018-01-01")
# test = test & isinstance(df, pd.DataFrame)

# df = get_descending_area(
# "departement", code="59", type="arrondissement", update=True
Expand Down

0 comments on commit 154d25e

Please sign in to comment.