Skip to content

Commit

Permalink
change encoding reading in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianherreramonterrosa committed Sep 24, 2024
1 parent 80f33cc commit 66f73f3
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/pytest/test_distribution_measurements.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


def get_data(path: str) -> list[float | int]:
sample_distribution_file = open(path, "r")
sample_distribution_file = open(path, "r", encoding="utf-8-sig")
data = [float(x.replace(",", ".")) for x in sample_distribution_file.read().splitlines()]
sample_distribution_file.close()
return data
Expand Down
2 changes: 1 addition & 1 deletion tests/pytest/test_phitter_continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


def get_data(path: str) -> list[float | int]:
sample_distribution_file = open(path, "r")
sample_distribution_file = open(path, "r", encoding="utf-8-sig")
data = [float(x.replace(",", ".")) for x in sample_distribution_file.read().splitlines()]
sample_distribution_file.close()
return data
Expand Down
2 changes: 1 addition & 1 deletion tests/pytest/test_phitter_discrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


def get_data(path: str) -> list[float | int]:
sample_distribution_file = open(path, "r")
sample_distribution_file = open(path, "r", encoding="utf-8-sig")
data = [float(x.replace(",", ".")) for x in sample_distribution_file.read().splitlines()]
sample_distribution_file.close()
return data
Expand Down
2 changes: 1 addition & 1 deletion tests/pytest/test_phitter_web_continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


def get_data(path: str) -> list[float | int]:
sample_distribution_file = open(path, "r")
sample_distribution_file = open(path, "r", encoding="utf-8-sig")
data = [float(x.replace(",", ".")) for x in sample_distribution_file.read().splitlines()]
sample_distribution_file.close()
return data
Expand Down
2 changes: 1 addition & 1 deletion tests/pytest/test_statistical_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


def get_data(path: str) -> list[float | int]:
sample_distribution_file = open(path, "r")
sample_distribution_file = open(path, "r", encoding="utf-8-sig")
data = [float(x.replace(",", ".")) for x in sample_distribution_file.read().splitlines()]
sample_distribution_file.close()
return data
Expand Down
2 changes: 1 addition & 1 deletion tests/pytest/tets_phitter_web_discrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


def get_data(path: str) -> list[float | int]:
sample_distribution_file = open(path, "r")
sample_distribution_file = open(path, "r", encoding="utf-8-sig")
data = [float(x.replace(",", ".")) for x in sample_distribution_file.read().splitlines()]
sample_distribution_file.close()
return data
Expand Down

0 comments on commit 66f73f3

Please sign in to comment.