d2947cfef0
GitOrigin-RevId: 598f83ebeb2235435189cf84d844b8b73e858e0f
67 lines
1.5 KiB
Nix
67 lines
1.5 KiB
Nix
{ lib
|
|
, assertpy
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, poetry-core
|
|
, pytest-asyncio
|
|
, pytest-mockservers
|
|
, pytest-resource-path
|
|
, pytest-sugar
|
|
, pytestCheckHook
|
|
, time-machine
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "aioswitcher";
|
|
version = "3.0.3";
|
|
format = "pyproject";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "TomerFi";
|
|
repo = pname;
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-CHyJuIqJpO7wUmOyeDXa4oBvxMthC96OCECtg13gqe0=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
preCheck = ''
|
|
export TZ=Asia/Jerusalem
|
|
'';
|
|
|
|
checkInputs = [
|
|
assertpy
|
|
pytest-asyncio
|
|
pytest-mockservers
|
|
pytest-resource-path
|
|
pytest-sugar
|
|
pytestCheckHook
|
|
time-machine
|
|
];
|
|
|
|
pytestFlagsArray = [
|
|
"--asyncio-mode=legacy"
|
|
];
|
|
|
|
disabledTests = [
|
|
# AssertionError: Expected <14:00> to be equal to <17:00>, but was not.
|
|
"test_schedule_parser_with_a_weekly_recurring_enabled_schedule_data"
|
|
"test_schedule_parser_with_a_daily_recurring_enabled_schedule_data"
|
|
"test_schedule_parser_with_a_partial_daily_recurring_enabled_schedule_data"
|
|
"test_schedule_parser_with_a_non_recurring_enabled_schedule_data"
|
|
"test_hexadecimale_timestamp_to_localtime_with_the_current_timestamp_should_return_a_time_string"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"aioswitcher"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python module to interact with Switcher water heater";
|
|
homepage = "https://github.com/TomerFi/aioswitcher";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|