From 5b46cee938012ddbb7850e16d4ca4128a6f55761 Mon Sep 17 00:00:00 2001 From: aceisace Date: Wed, 11 Jan 2023 23:13:00 +0100 Subject: [PATCH] set timeout for reading from ical url --- .github/workflows/tests.yml | 6 +++--- inkycal/tests/ical_parser_test.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2a973c0..e848a50 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,6 +4,7 @@ on: [push] jobs: build: + runs-on: ubuntu-latest steps: @@ -13,7 +14,6 @@ jobs: with: python-version: 3.9 - download and install: - name: Clone repo run: | git clone --branch feature/venv --single-branch https://github.com/aceisace/Inkycal @@ -24,13 +24,13 @@ jobs: python3 -m venv venv source venv/bin/activate python -m pip install --upgrade pip - + - name: Install dependencies run: | + echo "$PWD" pip install wheel pip install -e ./ - unit testing: - name: Setup test environment and run tests run: | cd inkycal/tests diff --git a/inkycal/tests/ical_parser_test.py b/inkycal/tests/ical_parser_test.py index d94e0aa..f92c06a 100755 --- a/inkycal/tests/ical_parser_test.py +++ b/inkycal/tests/ical_parser_test.py @@ -40,7 +40,7 @@ class ical_parser_test(unittest.TestCase): def test_laod_from_file(self): print('testing loading from file...', end="") - dummy = str(urlopen(test_ical).read().decode()) + dummy = str(urlopen(test_ical, timeout=10).read().decode()) with open('dummy.ical', mode="w", encoding="utf-8") as file: file.write(dummy) ical.load_from_file('dummy.ical')