mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-25 00:37:31 +02:00
utf-8 for windows support
This commit is contained in:
@ -10,29 +10,29 @@ class MyTests(unittest.TestCase):
|
|||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
# input
|
# input
|
||||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/pip-show.out'), 'r') as f:
|
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/pip-show.out'), 'r', encoding='utf-8') as f:
|
||||||
self.centos_7_7_pip_show = f.read()
|
self.centos_7_7_pip_show = f.read()
|
||||||
|
|
||||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/pip-show.out'), 'r') as f:
|
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/pip-show.out'), 'r', encoding='utf-8') as f:
|
||||||
self.ubuntu_18_4_pip_show = f.read()
|
self.ubuntu_18_4_pip_show = f.read()
|
||||||
|
|
||||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.11.6/pip-show.out'), 'r') as f:
|
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.11.6/pip-show.out'), 'r', encoding='utf-8') as f:
|
||||||
self.osx_10_11_6_pip_show = f.read()
|
self.osx_10_11_6_pip_show = f.read()
|
||||||
|
|
||||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/pip-show.out'), 'r') as f:
|
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/pip-show.out'), 'r', encoding='utf-8') as f:
|
||||||
self.osx_10_14_6_pip_show = f.read()
|
self.osx_10_14_6_pip_show = f.read()
|
||||||
|
|
||||||
# output
|
# output
|
||||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/pip-show.json'), 'r') as f:
|
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/pip-show.json'), 'r', encoding='utf-8') as f:
|
||||||
self.centos_7_7_pip_show_json = json.loads(f.read())
|
self.centos_7_7_pip_show_json = json.loads(f.read())
|
||||||
|
|
||||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/pip-show.json'), 'r') as f:
|
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/pip-show.json'), 'r', encoding='utf-8') as f:
|
||||||
self.ubuntu_18_4_pip_show_json = json.loads(f.read())
|
self.ubuntu_18_4_pip_show_json = json.loads(f.read())
|
||||||
|
|
||||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.11.6/pip-show.json'), 'r') as f:
|
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.11.6/pip-show.json'), 'r', encoding='utf-8') as f:
|
||||||
self.osx_10_11_6_pip_show_json = json.loads(f.read())
|
self.osx_10_11_6_pip_show_json = json.loads(f.read())
|
||||||
|
|
||||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/pip-show.json'), 'r') as f:
|
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/osx-10.14.6/pip-show.json'), 'r', encoding='utf-8') as f:
|
||||||
self.osx_10_14_6_pip_show_json = json.loads(f.read())
|
self.osx_10_14_6_pip_show_json = json.loads(f.read())
|
||||||
|
|
||||||
def test_pip_show_centos_7_7(self):
|
def test_pip_show_centos_7_7(self):
|
||||||
|
@ -10,17 +10,17 @@ class MyTests(unittest.TestCase):
|
|||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
# input
|
# input
|
||||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/systemctl.out'), 'r') as f:
|
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/systemctl.out'), 'r', encoding='utf-8') as f:
|
||||||
self.centos_7_7_systemctl = f.read()
|
self.centos_7_7_systemctl = f.read()
|
||||||
|
|
||||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/systemctl.out'), 'r') as f:
|
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/systemctl.out'), 'r', encoding='utf-8') as f:
|
||||||
self.ubuntu_18_4_systemctl = f.read()
|
self.ubuntu_18_4_systemctl = f.read()
|
||||||
|
|
||||||
# output
|
# output
|
||||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/systemctl.json'), 'r') as f:
|
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/systemctl.json'), 'r', encoding='utf-8') as f:
|
||||||
self.centos_7_7_systemctl_json = json.loads(f.read())
|
self.centos_7_7_systemctl_json = json.loads(f.read())
|
||||||
|
|
||||||
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/systemctl.json'), 'r') as f:
|
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/systemctl.json'), 'r', encoding='utf-8') as f:
|
||||||
self.ubuntu_18_4_systemctl_json = json.loads(f.read())
|
self.ubuntu_18_4_systemctl_json = json.loads(f.read())
|
||||||
|
|
||||||
def test_systemctl_centos_7_7(self):
|
def test_systemctl_centos_7_7(self):
|
||||||
|
Reference in New Issue
Block a user