mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-24 06:16:30 +03:00
28 lines
682 B
Python
Executable File
28 lines
682 B
Python
Executable File
#!/usr/bin/env python3
|
|
# Copyright 2021 The Chromium Authors
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
import os
|
|
import shutil
|
|
import sys
|
|
import tempfile
|
|
import unittest
|
|
|
|
import pak_util
|
|
|
|
|
|
class PackUtilTest(unittest.TestCase):
|
|
def test_extract(self):
|
|
tempdir = tempfile.mkdtemp()
|
|
old_argv = sys.argv
|
|
grit_root_dir = os.path.abspath(os.path.dirname(__file__))
|
|
sys.argv = [
|
|
'pak_util_unittest.py', 'extract',
|
|
os.path.join(grit_root_dir, 'grit/testdata/resources.pak'), '-o',
|
|
tempdir
|
|
]
|
|
pak_util.main()
|
|
sys.argv = old_argv
|
|
shutil.rmtree(tempdir, ignore_errors=True)
|