1From 716fcfa3203bc881b543916bdb9a17460951cd26 Mon Sep 17 00:00:00 2001
2From: "P. R. d. O" <d.ol.rod@protonmail.com>
3Date: Fri, 26 Nov 2021 07:13:32 -0600
4Subject: [PATCH] Fixing paths on tests
5
6---
7 tests/maintest.py | 7 ++++++-
8 tests/speedtest.py | 7 ++++++-
9 2 files changed, 12 insertions(+), 2 deletions(-)
10
11diff --git a/tests/maintest.py b/tests/maintest.py
12index 0e24ca4..3484437 100644
13--- a/tests/maintest.py
14+++ b/tests/maintest.py
15@@ -1,6 +1,11 @@
16 import fleep
17+import os
18
19-with open("testfile", "rb") as file:
20+current_dir = os.path.realpath(os.path.join(os.getcwd(),
21+ os.path.dirname(__file__)))
22+
23+with open(os.path.join(current_dir, "./testfile"),
24+ "rb") as file:
25 info = fleep.get(file.read(128))
26
27 assert info.type == ["raster-image"]
28diff --git a/tests/speedtest.py b/tests/speedtest.py
29index 89338ab..829d563 100644
30--- a/tests/speedtest.py
31+++ b/tests/speedtest.py
32@@ -1,7 +1,12 @@
33 import time
34 import fleep
35+import os
36
37-with open("testfile", "rb") as file:
38+current_dir = os.path.realpath(os.path.join(os.getcwd(),
39+ os.path.dirname(__file__)))
40+
41+with open(os.path.join(current_dir, "./testfile"),
42+ "rb") as file:
43 stream = file.read(128)
44
45 times = []
46--
472.33.1
48