Description
API of unittest very similar to unittest of Python
Unittest alternatives and similar packages
Based on the "Testing" category.
Alternatively, view Unittest alternatives based on common mentions on social networks and blogs.
-
bypass
Bypass provides a quick way to create a custom plug that can be put in place instead of an actual HTTP server to return prebaked responses to client requests. -
mix_test_interactive
Interactive watch mode for Elixir's mix test. https://hexdocs.pm/mix_test_interactive/ -
mecks_unit
A simple Elixir package to elegantly mock module functions within (asynchronous) ExUnit tests using Erlang's :meck library
InfluxDB - Purpose built for real-time analytics at any scale.
Do you think we are missing an alternative of Unittest or a related project?
README
Unittest
Unittest is a unit testing library for Elixir was originally inspired by Python standard testing framework. This is a port of unittest Python library for Elixir. It supports test automation, sharing of setup and shutdown code for tests, aggregation of tests into collections.
API of unittest
very similar to unittest
of Python. Below you can see examples.
Python:
def test_equal(self):
self.assertEqual(22, 23-1)
def test_is(self):
self.assertIsInstance("string", str)
self.assertIsInstance(True, bool)
self.assertIsInstance(["one", "two"], list)
Elixir:
test "equal" do
assert equal(22, 23-1)
end
test "is" do
assert is("string", :str)
assert is(true, :bool)
assert is([:one, :two], :list)
end
Installation
Just add :unittest
to deps:
def deps do
[{:unittest, "~> 0.1.0"}]
end
and run deps.get
:
โ mix deps.get
Atention
This is an experimental project and it's mean that we do not guarantee stability.
License
Unittest is licensed under the MIT License. See LICENSE for more information.
*Note that all licence references and agreements mentioned in the Unittest README section above
are relevant to that project's source code only.