From fb25b75deb5b8c2731f7280f851071ac5df32caf Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 23 Jun 2020 10:58:35 -0400 Subject: [PATCH] Add files in tests --- tests/__pycache__/__init__.cpython-36.pyc | Bin 148 -> 0 bytes tests/__pycache__/conftest.cpython-36.pyc | Bin 2791 -> 0 bytes tests/conftest.py | 2 +- tests/test_cli.py | 10 +++++----- tests/test_energyseries.py | 10 +++++----- tests/test_idf.py | 22 +++++++++++----------- tests/test_schedules.py | 2 +- tests/test_trnsys.py | 14 +++++++------- 8 files changed, 30 insertions(+), 30 deletions(-) delete mode 100644 tests/__pycache__/__init__.cpython-36.pyc delete mode 100644 tests/__pycache__/conftest.cpython-36.pyc diff --git a/tests/__pycache__/__init__.cpython-36.pyc b/tests/__pycache__/__init__.cpython-36.pyc deleted file mode 100644 index 68c85b5f29bc3cd7c37c83bb865d21420b97967d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 148 zcmXr!<>k6&AQa001dl-k3@`#24nSPY0whuxf*CX!{Z=v*frJsnFGu~*;?$yI{hZXI z{K}mC(#&Fgm;B_?+|<01V*TL!w370~qE!8oqQt!7oWzp+BK?xoVxUZXd}dx|NqoFs WLFFwDo80`A(wtN~kkQ3J%m4u4>?NH5 diff --git a/tests/__pycache__/conftest.cpython-36.pyc b/tests/__pycache__/conftest.cpython-36.pyc deleted file mode 100644 index c98df064b691ae353be7657d08d67d965b419932..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2791 zcmZuyOOxBi5yk)@2|kuutyXKv*~lpQ5!02BiIqy(<&7#zWSgwN+bACYnNRD&$DfgUw%GX0KwUPtW^vv|Uy1#zi+1cs*_g_DL_m8gQ z{ODZz8W{fxP5m2$JDlZCwC-8N?A(o9+k25`dq47R--w#r<=)hdTEd?NqQ!mQn7X{l zTR(U_;O!UAIg8r7!@Jniv3okA!+UmphxhGzm-yga`GN6We%11NmbYhl*Z98W?eObU z7WKsyelXiTr<w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mJP5 zUNHTQ%T;+j%?k2pq2(Xw>H!gQHPcVaJcs|s*|dPaSwyXDm$Z19k%FUn$?II)C9&0Q gkO11?he3i?;2rJ;%^QvV{{EGw+w+2;=>_fo0V-G4CjbBd diff --git a/tests/conftest.py b/tests/conftest.py index 54061c8..7298978 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -5,7 +5,7 @@ import sys import pytest -import translater as tr +import translator as tr # Parametrization of the fixture scratch_then_cache. The following array diff --git a/tests/test_cli.py b/tests/test_cli.py index a083b46..11cad52 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -4,13 +4,13 @@ import pytest from click.testing import CliRunner from path import Path -from translater import settings, copy_file, log, load_idf -from translater.cli import cli +from translator import settings, copy_file, log, load_idf +from translator.cli import cli from tests.test_trnsys import get_platform class TestCli: - """Defines tests for usage of the translater Command Line Interface""" + """Defines tests for usage of the translator Command Line Interface""" @pytest.fixture( params=[ @@ -73,7 +73,7 @@ class TestCli: "--ep_version", "9-2-0", "--window_lib", - "translater/ressources/W74-lib.dat", + "translator/ressources/W74-lib.dat", "tests/input_data/trnsys/simple_2_zone.idf", "tests/input_data/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw", "--trnsidf_exe", @@ -95,7 +95,7 @@ class TestCli: "--ep_version", "9-2-0", "--template", - "translater/ressources/NewFileTemplate.d18", + "translator/ressources/NewFileTemplate.d18", "tests/input_data/trnsys/simple_2_zone.idf", "tests/input_data/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw", "--trnsidf_exe", diff --git a/tests/test_energyseries.py b/tests/test_energyseries.py index 1edd4c3..a1be1e6 100644 --- a/tests/test_energyseries.py +++ b/tests/test_energyseries.py @@ -1,12 +1,12 @@ import os -import translater as tr +import translator as tr import pandas as pd import pytest from path import Path -from translater import EnergySeries, get_eplus_dirs, settings +from translator import EnergySeries, get_eplus_dirs, settings import numpy as np @@ -22,7 +22,7 @@ import numpy as np ], ) def energy_series(config, request): - from translater import ReportData + from translator import ReportData outputs = { "ep_object": "Output:Variable".upper(), @@ -62,7 +62,7 @@ def energy_series(config, request): params=(["Water Heater Tank Temperature", "WaterSystems:EnergyTransfer"]) ) def rd(request): - from translater import ReportData + from translator import ReportData file = Path("tests/input_data/trnsys/HeatPumpWaterHeater.sqlite") @@ -73,7 +73,7 @@ def rd(request): def test_EnergySeries(rd): import matplotlib.pyplot as plt - from translater import EnergySeries + from translator import EnergySeries es = EnergySeries.from_sqlite(rd) es.plot() diff --git a/tests/test_idf.py b/tests/test_idf.py index 5ce67e0..ab56584 100644 --- a/tests/test_idf.py +++ b/tests/test_idf.py @@ -2,15 +2,15 @@ import os import random import subprocess -import translater as tr +import translator as tr import matplotlib as mpl # use agg backend so you don't need a display on travis-ci import pytest from path import Path -import translater.settings -from translater import EnergyPlusProcessError, get_eplus_dirs, settings, \ +import translator.settings +from translator import EnergyPlusProcessError, get_eplus_dirs, settings, \ parallel_process mpl.use("Agg") @@ -85,7 +85,7 @@ def test_load_old(config): @pytest.mark.parametrize( "ep_version", - [translater.settings.ep_version, None], + [translator.settings.ep_version, None], ids=["specific-ep-version", "no-specific-ep-version"], ) def test_run_olderv(clean_config, ep_version): @@ -175,7 +175,7 @@ def test_area(archetype, area): """Test the conditioned_area property against published values desired values taken from https://github.com/canmet-energy/btap""" import numpy as np - from translater import load_idf + from translator import load_idf idf_file = Path("tests/input_data/necb/").glob("*{}*.idf".format(archetype)) idf = load_idf(next(iter(idf_file))) @@ -183,7 +183,7 @@ def test_area(archetype, area): def test_wwr(): - from translater import load_idf + from translator import load_idf idf_file = Path("tests/input_data/necb/").glob( "*{}*.idf".format("FullServiceRestaurant") @@ -194,7 +194,7 @@ def test_wwr(): def test_partition_ratio(): - from translater import load_idf + from translator import load_idf idf_file = Path("tests/input_data/necb/").glob("*LargeOffice*.idf") idf = load_idf(next(iter(idf_file))) @@ -202,7 +202,7 @@ def test_partition_ratio(): def test_space_cooling_profile(config): - from translater import load_idf + from translator import load_idf file = ( get_eplus_dirs(settings.ep_version) @@ -218,7 +218,7 @@ def test_space_cooling_profile(config): def test_space_heating_profile(config): - from translater import load_idf + from translator import load_idf file = "tests/input_data/necb/NECB 2011-Warehouse-NECB HDD Method-CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw.idf" wf = "tests/input_data/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" @@ -229,7 +229,7 @@ def test_space_heating_profile(config): def test_dhw_profile(config): - from translater import load_idf + from translator import load_idf file = "tests/input_data/necb/NECB 2011-Warehouse-NECB HDD Method-CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw.idf" wf = "tests/input_data/CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" @@ -243,7 +243,7 @@ def test_dhw_profile(config): def test_old_than_change_args(clean_config): """Should upgrade file only once even if run_eplus args are changed afterwards""" - from translater import run_eplus + from translator import run_eplus file = ( get_eplus_dirs(settings.ep_version) diff --git a/tests/test_schedules.py b/tests/test_schedules.py index 4834034..2dd7c2d 100644 --- a/tests/test_schedules.py +++ b/tests/test_schedules.py @@ -2,7 +2,7 @@ import os import pytest -from translater import ( +from translator import ( Schedule, load_idf, copy_file, diff --git a/tests/test_trnsys.py b/tests/test_trnsys.py index 85479c1..02430dc 100644 --- a/tests/test_trnsys.py +++ b/tests/test_trnsys.py @@ -5,7 +5,7 @@ import shutil import pytest -import translater as tr +import translator as tr import pandas as pd @@ -13,7 +13,7 @@ from path import Path from copy import deepcopy -from translater import ( +from translator import ( convert_idf_to_trnbuild, parallel_process, trnbuild_idf, @@ -27,7 +27,7 @@ from translater import ( ) # Function round to hundreds -from translater.trnsys import ( +from translator.trnsys import ( _assert_files, load_idf_file_and_clean_names, clear_name_idf_objects, @@ -72,7 +72,7 @@ from tests.conftest import get_platform def converttesteasy(request): file = request.param window_file = "W74-lib.dat" - template_dir = os.path.join("translater", "ressources") + template_dir = os.path.join("translator", "ressources") window_filepath = os.path.join(template_dir, window_file) template_d18 = "tests/input_data/trnsys/NewFileTemplate.d18" trnsidf_exe = "docker/trnsidf/trnsidf.exe" # 'docker/trnsidf/trnsidf.exe' @@ -770,7 +770,7 @@ def converttest(request): file = get_eplus_dirs(settings.ep_version) / "ExampleFiles" / request.param # file = request.param window_file = "W74-lib.dat" - template_dir = os.path.join("translater", "ressources") + template_dir = os.path.join("translator", "ressources") window_filepath = os.path.join(template_dir, window_file) template_d18 = "tests/input_data/trnsys/NewFileTemplate.d18" trnsidf_exe = "docker/trnsidf/trnsidf.exe" # 'docker/trnsidf/trnsidf.exe' @@ -1162,7 +1162,7 @@ class TestTrnBuild: def test_trnbuild_from_idf(self, config, trnbuild_file): # Gets file paths/names window_file = "W74-lib.dat" - template_dir = os.path.join("translater", "ressources") + template_dir = os.path.join("translator", "ressources") window_filepath = os.path.join(template_dir, window_file) weather_file = os.path.join( "tests", "input_data", "CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw" @@ -1305,7 +1305,7 @@ class TestTrnBuild: def test_trnbuild_from_simple_idf(config): # Path to weather file, window library and T3D template window_file = "W74-lib.dat" - template_dir = os.path.join("translater", "ressources") + template_dir = os.path.join("translator", "ressources") window_filepath = os.path.join(template_dir, window_file) weather_file = os.path.join( "tests", "input_data", "CAN_QC_Montreal-McTavish.716120_CWEC2016.epw"