aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test.py b/tests/test.py
index d217f80..58b504d 100644
--- a/tests/test.py
+++ b/tests/test.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-
+import os
import unittest
from SyncRNG import SyncRNG
@@ -39,7 +39,11 @@ class SyncRNGTestCase(unittest.TestCase):
def test_first_1000(self):
s = SyncRNG(seed=0)
- with open("./test/first_1000_seed_0.txt", "r") as fid:
+
+ here = os.path.dirname(__file__)
+ test_file = os.path.join(here, "first_1000_seed_0.txt")
+
+ with open(test_file, "r") as fid:
for line in fid:
exp = int(line.strip())
self.assertTrue(exp == s.randi())