コード例 #1
0
 def test_any_status_is(self):
     self.assertTrue(
         weatherutils.any_status_is(self.__test_weathers, "sun",
                                    self.__test_registry))
     self.assertFalse(
         weatherutils.any_status_is(self.__test_weathers, "storm",
                                    self.__test_registry))
コード例 #2
0
    def will_have_clear(self):
        """
        Tells if into the forecast coverage exist one or more *Weather* items
        related to clear sky conditions

        :returns: boolean

        """
        return weatherutils.any_status_is(self._forecast.get_weathers(), "sun",
                                          weather_code_registry)
コード例 #3
0
    def will_have_hurricane(self):
        """
        Tells if into the forecast coverage exist one or more *Weather* items
        related to hurricanes

        :returns: boolean

        """
        return weatherutils.any_status_is(self._forecast.get_weathers(),
                                          "hurricane", weather_code_registry)
コード例 #4
0
ファイル: forecaster.py プロジェクト: csparpa/pyowm
    def will_have_clear(self):
        """
        Tells if into the forecast coverage exist one or more *Weather* items
        related to clear sky conditions

        :returns: boolean

        """
        return weatherutils.any_status_is(self._forecast.get_weathers(), "sun",
                                          weather_code_registry)
コード例 #5
0
ファイル: forecaster.py プロジェクト: csparpa/pyowm
    def will_have_hurricane(self):
        """
        Tells if into the forecast coverage exist one or more *Weather* items
        related to hurricanes

        :returns: boolean

        """
        return weatherutils.any_status_is(self._forecast.get_weathers(), "hurricane",
                                          weather_code_registry)
コード例 #6
0
ファイル: test_weatherutils.py プロジェクト: csparpa/pyowm
 def test_any_status_is(self):
     self.assertTrue(weatherutils.any_status_is(self.__test_weathers,
                                                "sun", self.__test_registry))
     self.assertFalse(weatherutils.any_status_is(self.__test_weathers,
                                                "storm",
                                                 self.__test_registry))