File: annotated_functions.py

package info (click to toggle)
beaker 1.13.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 716 kB
  • sloc: python: 6,036; makefile: 62
file content (15 lines) | stat: -rw-r--r-- 497 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# -*- coding: utf-8 -*-
"""This is a collection of annotated functions used by tests.

They are grouped here to provide an easy way to import them at runtime
to check whenever tests for annotated functions should be skipped or not
on current python version.
"""
from beaker.cache import cache_region
import time

class AnnotatedAlfredCacher(object):
    @cache_region('short_term')
    def alfred_self(self, xx: int, y=None) -> str:
        return str(time.time()) + str(self) + str(xx) + str(y)