Skip to content

Commit

Permalink
move write testfile to unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
heikoschmidt committed Mar 8, 2024
1 parent 8114bca commit fbfd6c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/pypacer/pypacer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
from typing import Optional

import yaml
Expand Down Expand Up @@ -32,5 +31,4 @@ def _get_javascript(self) -> str:

def output(self) -> str:
output = self._get_javascript()
open(os.path.join(location, "..", "examples", "unittests.pac"), "w").write(output)
return output
2 changes: 2 additions & 0 deletions src/pypacer/pypacer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ def setUp(self):
def test_load_config_from_yaml(self):
p = PyPacer()
p.load_config_from_yaml(self.pac_file)
output = p.output()
open(os.path.join(location, "..", "examples", "unittests.pac"), "w").write(output)
self.assertIsInstance(p.config, PyPacerConfig)
self.assertEqual(p.config.default, "PROXY_A")

Expand Down

0 comments on commit fbfd6c0

Please sign in to comment.