# \[ANN\] TestingUtilities.jl

**URL:** <https://discourse.julialang.org/t/ann-testingutilities-jl/99121>\
**Category:** Package Announcements\
**Tags:** package, announcement, testing\
**Created:** [May 19, 2023, 4:44pm UTC](https://discourse.julialang.org/t/ann-testingutilities-jl/99121 "2023-05-19T16:44:29Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![curtd](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/curtd/32/15868_2.png) [@curtd](https://discourse.julialang.org/u/curtd)\
**Post date:** [June 20, 2023, 10:40pm UTC](https://discourse.julialang.org/t/ann-testingutilities-jl/99121/5 "2023-06-20T22:40:42Z")

</div>

## Version 1.3.0

Version 1.3.0 is out now and brings some convenient features for failing equality tests, e.g., `@Test x == y` or `@Test isequal(x,y)`. When `x` and `y` have specific types listed below, `TestingUtilities` will print out a nicely formatted message about why specifically these two quantities are not equal (similar in spirit to [WhyNotEqual.jl](https://github.com/jw3126/WhyNotEqual.jl)).

### Strings

If `x` and `y` are two `String`s, the failing test will display the common prefix of `x` and `y` in green and the subsequently differing suffix in red, e.g.,

 ![string_diff1](https://global.discourse-cdn.com/julialang/original/3X/e/7/e7b8a542e90ba6f7b3f5aa1ec2de6e93f62b8c1f.png)

If you’re unable to distinguish between red & green text, or you just want to change how the differences are displayed, you can invoke `TestingUtilities.set_show_diff_styles`, which accepts any keyword arguments also accepted by `Base.printstyled`, e.g.,

 ![string_diff2](https://global.discourse-cdn.com/julialang/original/3X/3/2/326644f59e2bca830869481fb20845dc7a5846d0.png)

### DataFrames (Julia 1.9+ only)

If `x` and `y` are two `DataFrames`, the failing test will display the reason that `x` and `y` are not equal, e.g.,

- `x` and `y` have differing column names  

- `x` and `y` have the same column names but differing number of rows  

- `x` and `y` have the same column names and number of rows, but differing values  

As the `DataFrames` package are loaded via package extensions, this feature requires at least Julia 1.9.

---

_[View the full topic](https://discourse.julialang.org/t/ann-testingutilities-jl/99121)._
