From 94e64b1930fbe67178adfe062336c8080c24cb81 Mon Sep 17 00:00:00 2001 From: Amal Francis Date: Tue, 8 Aug 2017 12:36:56 +0530 Subject: [PATCH] Add gitignore and rename sqlite testing db file --- .gitignore | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ test.py | 5 ++-- 2 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9211cad --- /dev/null +++ b/.gitignore @@ -0,0 +1,67 @@ +*.py[cod] + +# C extensions +*.so + +# Packages +*.egg +*.egg-info +dist +build +eggs +.eggs +parts +bin +var +sdist +wheelhouse +develop-eggs +.installed.cfg +lib +lib64 +venv*/ +pyvenv*/ + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox +.coverage.* +nosetests.xml +coverage.xml +htmlcov + +# Translations +*.mo + +# Mr Developer +.mr.developer.cfg +.project +.pydevproject +.idea +*.iml +*.komodoproject + +# Complexity +output/*.html +output/*/index.html + +# Sphinx +docs/_build + +.DS_Store +*~ +.*.sw[po] +.build +.ve +.env +.cache +.pytest +.bootstrap +.appveyor.token +*.bak + +# SQLite db files +*.db diff --git a/test.py b/test.py index a3ce467..50ab90a 100644 --- a/test.py +++ b/test.py @@ -3,7 +3,8 @@ from cashier import cache, Cashier from time import time -c = Cashier(file_name="testing") +TEST_DB_FILENAME = "testing.db" +c = Cashier(file_name=TEST_DB_FILENAME) c.clear() data = requests.get("https://news.ycombinator.com") @@ -57,7 +58,7 @@ def add(a): no_cache_run = end_time - start_time -@cache("testing", 60, 100, True) +@cache(TEST_DB_FILENAME, 60, 100, True) def add(a): try: return requests.get(a)