Skip to content

Instantly share code, notes, and snippets.

View johnliu55tw's full-sized avatar

John Liu johnliu55tw

View GitHub Profile
@johnliu55tw
johnliu55tw / test_utils.py
Created January 11, 2019 01:41
Utility functions for testing Python importability
import sys
import shutil
import tempfile
from os.path import dirname as p_dirname
from os.path import join as p_join
from types import GeneratorType
import unittest
import mock
#!/usr/bin/env python3
import subprocess
# Need VPN to get this image
image = 'registry.suse.de/suse/containers/suse-microos/5.2/containers/suse/sle-micro-rancher/5.2:latest'
def get_zypper_packages(dockerfile):
with open(dockerfile, 'r') as f: