aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2018-04-03 11:39:59 +0200
committerMatěj Cepl <mcepl@cepl.eu>2019-10-02 12:29:46 +0200
commit606078cabb24ddf1e2cb29175e6d7deae73f5749 (patch)
tree2105f8fbbbb6abbde70c14322d7dfc3c3ebc75be /test
parentdf2683228cfb151dad3e78a624181af6fc771545 (diff)
downloadpygn-606078cabb24ddf1e2cb29175e6d7deae73f5749.tar.gz
Global variables are evil. Tests under both py2k and py3k pass.
Diffstat (limited to 'test')
-rwxr-xr-xtest/test_pyg.py2
-rwxr-xr-xtest/test_wlp.py5
2 files changed, 2 insertions, 5 deletions
diff --git a/test/test_pyg.py b/test/test_pyg.py
index 4076fc3..ddf8146 100755
--- a/test/test_pyg.py
+++ b/test/test_pyg.py
@@ -1,6 +1,4 @@
#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
import re
import subprocess
import unittest
diff --git a/test/test_wlp.py b/test/test_wlp.py
index 430c235..929fb1c 100755
--- a/test/test_wlp.py
+++ b/test/test_wlp.py
@@ -1,5 +1,4 @@
#!/usr/bin/python
-# -*- coding: utf-8 -*-
import unittest
import wlp_parser
@@ -97,8 +96,8 @@ class TestWLP(unittest.TestCase):
self.assertEqual(tree, expected_tree)
def test_wlp(self):
- wlp.setfilebyname('examples/whitelist.example')
- wl_dict = wlp.mkdict()
+ with open('examples/whitelist.example') as inf:
+ wl_dict = wlp.mkdict(inf)
self.assertEqual(wl_dict, EXPECTED_WL)