def test_defaults_centos(self): """Default python building block""" p = python() self.assertEqual(str(p), r'''# Python RUN yum install -y epel-release && \ yum install -y \ python \ python34 && \ rm -rf /var/cache/yum/*''')
def test_defaults_ubuntu(self): """Default python building block""" p = python() self.assertEqual(str(p), r'''# Python RUN apt-get update -y && \ apt-get install -y --no-install-recommends \ python \ python3 && \ rm -rf /var/lib/apt/lists/*''')
def test_runtime(self): """Runtime""" p = python() r = p.runtime() s = '\n'.join(str(x) for x in r) self.assertEqual(s, r'''# Python RUN apt-get update -y && \ apt-get install -y --no-install-recommends \ python \ python3 && \ rm -rf /var/lib/apt/lists/*''')