21st Week of 2022
New: Introduce BeautifulSoup and how to use it.
BeautifulSoup is a Python library for pulling data out of HTML and XML files. It works with your favorite parser to provide idiomatic ways of navigating, searching, and modifying the parse tree.
Sometimes test functions do not directly need access to a fixture object. For example, tests may require to operate with an empty directory as the current working directory but otherwise do not care for the concrete directory.Due to the
@pytest.mark.usefixtures("cleandir") class TestDirectoryInit: ...
cleandirfixture will be required for the execution of each test method, just as if you specified a
cleandirfunction argument to each of them.
You can specify multiple fixtures like this:
Correction: Improve the snippet to run some tests in serial instead of parallel.
New: HTML beautifier.
If you encounter html code that it's not well indented you can use html beautify.
New: Pod limit per node.
AWS EKS supports native VPC networking with the Amazon VPC Container Network Interface (CNI) plugin for Kubernetes. Using this plugin allows Kubernetes Pods to have the same IP address inside the pod as they do on the VPC network.
This is a great feature but it introduces a limitation in the number of Pods per EC2 Node instance. Whenever you deploy a Pod in the EKS worker Node, EKS creates a new IP address from VPC subnet and attach to the instance.
The formula for defining the maximum number of pods per instance is as follows:
N * (M-1) + 2
Nis the number of Elastic Network Interfaces (ENI) of the instance type.
Mis the number of IP addresses of a single ENI.
t3.small, this calculation is
3 * (4-1) + 2 = 11. For a list of all the instance types and their limits see this document