New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support usage in Jupyter notebooks #1207
Comments
Can you please share some more specifics. We have no experience with Jupyter notebooks. |
You can play around with the above scenario in this published notebook. Or read more about C# and Jupyter Notebooks here or here. In short: Jupyter Notebooks run C# scripts in the web browser "embedded" between markdown text. A great tool for prototyping and documentation/explanation. With |
@ralfw Thanks for reporting this bug! Until this is fixed, here's a dirty workaround that makes your provided Jupyter Notebook work as expected. using FluentAssertions.Common;
Configuration.Current.ValueFormatterDetectionMode = ValueFormatterDetectionMode.Disabled;
Configuration.Current.TestFrameworkName = "fallback"; |
Thanks for the workaround! I can live with that for now. But a solution to the root problem would be nice, too, of course.😉 |
Some platforms throws reflection exceptions when trying to use `ConfigurationManager`. This does not fix the underlying problem of not being unable to use `ConfigurationManager`, but returns `null` instead of an exception. Relates to fluentassertions#1207 and fluentassertions#1152
Some platforms throws reflection exceptions when trying to use `ConfigurationManager`. This does not fix the underlying problem of not being unable to use `ConfigurationManager`, but returns `null` instead of an exception. Relates to fluentassertions#1207 and fluentassertions#1151
Some platforms throws reflection exceptions when trying to use `ConfigurationManager`. This does not fix the underlying problem of not being unable to use `ConfigurationManager`, but returns `null` instead of an exception. Relates to fluentassertions#1207 and fluentassertions#1151
Some platforms throws reflection exceptions when trying to use `ConfigurationManager`. This does not fix the underlying problem of not being unable to use `ConfigurationManager`, but returns `null` instead of an exception. Relates to fluentassertions#1207 and fluentassertions#1151
Can we close this now? |
Yes, I'm good with the decorator approach. |
Description
When using FluentAssertions in a C# Jupyter notebook and the assertion fails, the exception is not pertaining to the actual mismatch, but regarding missing infrastructure.
Complete minimal example reproducing the issue
Expected behavior:
The expected exception for the above example is:
Actual behavior:
The actual exception is:
The behavior does not change if
#r "nuget:System.Configuration.ConfigurationManager"
is added to the cell before loading FluentAssertions.Versions
#r
statement.The text was updated successfully, but these errors were encountered: