1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

update tests to set correct timezone on POSIX systems

This commit is contained in:
Kelly Brazil
2021-07-07 08:53:52 -07:00
parent 2c6f3993cb
commit f10ebea209
11 changed files with 78 additions and 0 deletions

View File

@ -1,10 +1,17 @@
import os import os
import sys
import time
import json import json
import unittest import unittest
import jc.parsers.date import jc.parsers.date
THIS_DIR = os.path.dirname(os.path.abspath(__file__)) THIS_DIR = os.path.dirname(os.path.abspath(__file__))
# Set the timezone on POSIX systems. Need to manually set for Windows tests
if not sys.platform.startswith('win32'):
os.environ['TZ'] = 'America/Los_Angeles'
time.tzset()
class MyTests(unittest.TestCase): class MyTests(unittest.TestCase):

View File

@ -1,10 +1,17 @@
import os import os
import sys
import time
import json import json
import unittest import unittest
import jc.parsers.dig import jc.parsers.dig
THIS_DIR = os.path.dirname(os.path.abspath(__file__)) THIS_DIR = os.path.dirname(os.path.abspath(__file__))
# Set the timezone on POSIX systems. Need to manually set for Windows tests
if not sys.platform.startswith('win32'):
os.environ['TZ'] = 'America/Los_Angeles'
time.tzset()
class MyTests(unittest.TestCase): class MyTests(unittest.TestCase):

View File

@ -1,10 +1,17 @@
import os import os
import sys
import time
import json import json
import unittest import unittest
import jc.parsers.dir import jc.parsers.dir
THIS_DIR = os.path.dirname(os.path.abspath(__file__)) THIS_DIR = os.path.dirname(os.path.abspath(__file__))
# Set the timezone on POSIX systems. Need to manually set for Windows tests
if not sys.platform.startswith('win32'):
os.environ['TZ'] = 'America/Los_Angeles'
time.tzset()
class MyTests(unittest.TestCase): class MyTests(unittest.TestCase):

View File

@ -1,10 +1,17 @@
import os import os
import sys
import time
import json import json
import unittest import unittest
import jc.parsers.last import jc.parsers.last
THIS_DIR = os.path.dirname(os.path.abspath(__file__)) THIS_DIR = os.path.dirname(os.path.abspath(__file__))
# Set the timezone on POSIX systems. Need to manually set for Windows tests
if not sys.platform.startswith('win32'):
os.environ['TZ'] = 'America/Los_Angeles'
time.tzset()
class MyTests(unittest.TestCase): class MyTests(unittest.TestCase):

View File

@ -1,10 +1,17 @@
import os import os
import sys
import time
import json import json
import unittest import unittest
import jc.parsers.ls import jc.parsers.ls
THIS_DIR = os.path.dirname(os.path.abspath(__file__)) THIS_DIR = os.path.dirname(os.path.abspath(__file__))
# Set the timezone on POSIX systems. Need to manually set for Windows tests
if not sys.platform.startswith('win32'):
os.environ['TZ'] = 'America/Los_Angeles'
time.tzset()
class MyTests(unittest.TestCase): class MyTests(unittest.TestCase):

View File

@ -1,10 +1,17 @@
import os import os
import sys
import time
import unittest import unittest
import json import json
import jc.parsers.rpm_qi import jc.parsers.rpm_qi
THIS_DIR = os.path.dirname(os.path.abspath(__file__)) THIS_DIR = os.path.dirname(os.path.abspath(__file__))
# Set the timezone on POSIX systems. Need to manually set for Windows tests
if not sys.platform.startswith('win32'):
os.environ['TZ'] = 'America/Los_Angeles'
time.tzset()
class MyTests(unittest.TestCase): class MyTests(unittest.TestCase):

View File

@ -1,10 +1,17 @@
import os import os
import sys
import time
import json import json
import unittest import unittest
import jc.parsers.stat import jc.parsers.stat
THIS_DIR = os.path.dirname(os.path.abspath(__file__)) THIS_DIR = os.path.dirname(os.path.abspath(__file__))
# Set the timezone on POSIX systems. Need to manually set for Windows tests
if not sys.platform.startswith('win32'):
os.environ['TZ'] = 'America/Los_Angeles'
time.tzset()
class MyTests(unittest.TestCase): class MyTests(unittest.TestCase):

View File

@ -1,10 +1,17 @@
import json import json
import os import os
import sys
import time
import unittest import unittest
import jc.parsers.systeminfo import jc.parsers.systeminfo
THIS_DIR = os.path.dirname(os.path.abspath(__file__)) THIS_DIR = os.path.dirname(os.path.abspath(__file__))
# Set the timezone on POSIX systems. Need to manually set for Windows tests
if not sys.platform.startswith('win32'):
os.environ['TZ'] = 'America/Los_Angeles'
time.tzset()
class MyTests(unittest.TestCase): class MyTests(unittest.TestCase):
test_files = [ test_files = [

View File

@ -1,10 +1,17 @@
import os import os
import sys
import time
import json import json
import unittest import unittest
import jc.parsers.upower import jc.parsers.upower
THIS_DIR = os.path.dirname(os.path.abspath(__file__)) THIS_DIR = os.path.dirname(os.path.abspath(__file__))
# Set the timezone on POSIX systems. Need to manually set for Windows tests
if not sys.platform.startswith('win32'):
os.environ['TZ'] = 'America/Los_Angeles'
time.tzset()
class MyTests(unittest.TestCase): class MyTests(unittest.TestCase):

View File

@ -1,6 +1,14 @@
import os
import sys
import time
import unittest import unittest
import jc.utils import jc.utils
# Set the timezone on POSIX systems. Need to manually set for Windows tests
if not sys.platform.startswith('win32'):
os.environ['TZ'] = 'America/Los_Angeles'
time.tzset()
class MyTests(unittest.TestCase): class MyTests(unittest.TestCase):

View File

@ -1,10 +1,17 @@
import os import os
import sys
import time
import json import json
import unittest import unittest
import jc.parsers.who import jc.parsers.who
THIS_DIR = os.path.dirname(os.path.abspath(__file__)) THIS_DIR = os.path.dirname(os.path.abspath(__file__))
# Set the timezone on POSIX systems. Need to manually set for Windows tests
if not sys.platform.startswith('win32'):
os.environ['TZ'] = 'America/Los_Angeles'
time.tzset()
class MyTests(unittest.TestCase): class MyTests(unittest.TestCase):