Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / aioswitcher / default.nix
blob4534dcf09687de87db2b388eb4fae2622a84238a
1 { lib
2 , assertpy
3 , buildPythonPackage
4 , fetchFromGitHub
5 , poetry-core
6 , pytest-asyncio
7 , pytest-mockservers
8 , pytest-resource-path
9 , pytest-sugar
10 , pytestCheckHook
11 , pythonAtLeast
12 , pythonOlder
13 , time-machine
16 buildPythonPackage rec {
17   pname = "aioswitcher";
18   version = "3.4.2";
19   pyproject = true;
21   disabled = pythonOlder "3.9";
23   src = fetchFromGitHub {
24     owner = "TomerFi";
25     repo = pname;
26     rev = "refs/tags/${version}";
27     hash = "sha256-UpwIzwOl1yKqK8KxFDXAWoZFkQ+1r1sUcDfx6AxRdNw=";
28   };
30   __darwinAllowLocalNetworking = true;
32   nativeBuildInputs = [
33     poetry-core
34   ];
36   preCheck = ''
37     export TZ=Asia/Jerusalem
38   '';
40   nativeCheckInputs = [
41     assertpy
42     pytest-asyncio
43     pytest-mockservers
44     pytest-resource-path
45     pytest-sugar
46     pytestCheckHook
47     time-machine
48   ];
50   disabledTests = [
51     # AssertionError: Expected <14:00> to be equal to <17:00>, but was not.
52     "test_schedule_parser_with_a_weekly_recurring_enabled_schedule_data"
53     "test_schedule_parser_with_a_daily_recurring_enabled_schedule_data"
54     "test_schedule_parser_with_a_partial_daily_recurring_enabled_schedule_data"
55     "test_schedule_parser_with_a_non_recurring_enabled_schedule_data"
56   ] ++ lib.optionals (pythonAtLeast "3.12") [
57     # ssertionError: Expected <'I' format requires 0 <= number <= 4294967295> to be equal to <argument out of range>, but was not.
58     "test_minutes_to_hexadecimal_seconds_with_a_negative_value_should_throw_an_error"
59     "test_current_timestamp_to_hexadecimal_with_errornous_value_should_throw_an_error"
60   ];
62   pythonImportsCheck = [
63     "aioswitcher"
64   ];
66   meta = with lib; {
67     description = "Python module to interact with Switcher water heater";
68     homepage = "https://github.com/TomerFi/aioswitcher";
69     changelog = "https://github.com/TomerFi/aioswitcher/releases/tag/${version}";
70     license = with licenses; [ mit ];
71     maintainers = with maintainers; [ fab ];
72   };