Skip to content

Commit 9e3ce91

Browse files
Adopt pytest (#117)
* Pytest framework
1 parent c4d431f commit 9e3ce91

File tree

51 files changed

+505
-1349
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+505
-1349
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@
33
################################################################################
44

55
/.vs
6+
7+
# Byte-compiled / optimized / DLL files
8+
__pycache__/
9+
*.py[cod]

Datasources/Domoticz/Test/test.py

-55
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from tests.helpers import run_commands
2+
3+
# List scripts and their CLI args
4+
COMMANDS = [
5+
("DomoticzDataPrepare.py", ["-y", "Sample files/domoticz.db"]),
6+
]
7+
8+
9+
def test_commands(repo_root):
10+
"""
11+
Executes all script commands, then verifies CSV outputs.
12+
"""
13+
run_commands(repo_root, COMMANDS)

Datasources/Eneco/Test/test.py

-55
This file was deleted.

Datasources/Eneco/tests/test_Eneco.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from tests.helpers import run_commands
2+
3+
# List scripts and their CLI args
4+
COMMANDS = [
5+
("EnecoDataPrepare.py", ["-y", "Sample files/Verbruik_01-01-2020-31-12-2020.xlsx"]),
6+
]
7+
8+
9+
def test_commands(repo_root):
10+
"""
11+
Executes all script commands, then verifies CSV outputs.
12+
"""
13+
run_commands(repo_root, COMMANDS)

Datasources/Enel Distribuzione/Test/test.py

-55
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
from tests.helpers import run_commands
2+
3+
# List scripts and their CLI args
4+
COMMANDS = [
5+
(
6+
"EnelDistribuzioneDataPrepare.py",
7+
["-y", "Sample files/ExportData_settembre.csv"],
8+
),
9+
]
10+
11+
12+
def test_commands(repo_root):
13+
"""
14+
Executes all script commands, then verifies CSV outputs.
15+
"""
16+
run_commands(repo_root, COMMANDS)

Datasources/EnergyControl/Test/test.py

-55
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from tests.helpers import run_commands
2+
3+
# List scripts and their CLI args
4+
COMMANDS = [
5+
("EnergyControlDataPrepare.py", ["-y", "Sample files/Water.csv"]),
6+
]
7+
8+
9+
def test_commands(repo_root):
10+
"""
11+
Executes all script commands, then verifies CSV outputs.
12+
"""
13+
run_commands(repo_root, COMMANDS)

Datasources/Engie/Test/test.py

-55
This file was deleted.

Datasources/Engie/tests/test_Engie.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from tests.helpers import run_commands
2+
3+
# List scripts and their CLI args
4+
COMMANDS = [
5+
("EngieDataPrepare.py", ["-y", "Sample files/Export.verbruiken.ENGIE.csv"]),
6+
]
7+
8+
9+
def test_commands(repo_root):
10+
"""
11+
Executes all script commands, then verifies CSV outputs.
12+
"""
13+
run_commands(repo_root, COMMANDS)

0 commit comments

Comments
 (0)