question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test suite cleanup

See original GitHub issue

When we migrated from unittest to pytest, our understanding was that we had to use only test functions rather than test cases with test methods. This lead to structures like this:

https://github.com/pystiche/pystiche/blob/65f4d787e44b1ffbf7e5b6e48298ed8c7460e5a9/tests/integration/enc/test_multi_layer_encoder.py#L50-L68

In general, there are quite a few places were the test suite looks like

def test_Foo_bar():
    ...

def test_Foo_baz():
    ...

instead of

class TestFoo:
    def test_bar(self):
        ...

    def test_baz(self):
        ...

Cleaning this up is a little bit of busy work, but can be a good entry point to the development of pystiche.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
DevPranjalcommented, Aug 26, 2021

Tracker for tests in tests/integration/:

  • core (#520)
  • data (#520)
  • demo (#523)
  • enc (#537)
    • models (#523)
  • image (#536)
  • loss (#536)
  • meta (#537)
  • misc (#537)
  • ops (#539)
  • pyramid (#539)
1reaction
DevPranjalcommented, Aug 26, 2021

Looking forward to help more…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setup and Cleanup Tests - Micro Focus
Cleanup tests typically include scripts or manual procedures that restore test environments to their original state following tests. When setup tests are ...
Read more >
Clean Code with Unit Tests: Tips and tricks for keeping your ...
If you're not careful in doing proper teardown or cleanup between tests in your test files, you may end up modifying global variables...
Read more >
Test Suite Cleanup: Permanent Issue #3155 - GitHub
Hi there! This issue is a permanent issue dedicated as a hub for efforts to improve the quality of the test suite.
Read more >
Get plots from cleanup callbacks of test suite - MathWorks
This MATLAB function returns figure handles of plots from the cleanup callbacks of the test suite associated with the results.
Read more >
Testing in Go: Clean Tests Using t.Cleanup - Ilija Eftimov ‍
Cleanup methods, added to the testing package. The introduction of these methods will make it easier for our tests to clean up after...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found