コード例 #1
0
ファイル: forecaster.py プロジェクト: parasat2011/copy2bot
    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)
コード例 #2
0
ファイル: forecaster.py プロジェクト: parasat2011/copy2bot
    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)
コード例 #3
0
ファイル: forecaster.py プロジェクト: FailSafe86/pyowm
    def will_have_fog(self):
        """
        Tells if into the forecast coverage exist one or more *Weather* items
        related to fog conditions

        :returns: boolean

        """
        return weatherutils.any_status_is(self._forecast.get_weathers(), "fog",
                                          weather_code_registry)
コード例 #4
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))