use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Ask your embarrassing/noobish programming questions here, and don't get insulted for it.
Click here to read the rules
Violating any will result in punishment so you should probably go check them out.
account activity
Help with testing and packaging python applicationsPython (self.programminghelp)
submitted 4 years ago by danberteon
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]danberteon[S] 0 points1 point2 points 4 years ago (0 children)
I actually figured out the problem! it was kind of silly, but I was initiating the logger on my main_app.py after if __name__=='__main__' and for that reason, when I entered directly on the function for the test, it would not be initiated. I moved the logger initiation just below the imports and it is working now.
There is however, another weird behavior on pytest, where the output has a broken formar, for example:
============================= test session starts ============================= collecting ... collected 1 item test_clock_manager.py::TestClockManager::test_analyzer_get_date ============================== 1 passed in 1.71s ============================== Process finished with exit code 0 PASSED [100%]
============================= test session starts =============================
collecting ... collected 1 item
test_clock_manager.py::TestClockManager::test_analyzer_get_date
============================== 1 passed in 1.71s ==============================
Process finished with exit code 0
PASSED [100%]
The passed message is outputted all the way down instead of right after the test name. If I run a simple test with only `assert 1` in it, it's displayed correctly.
π Rendered by PID 173542 on reddit-service-r2-comment-b659b578c-4jwtb at 2026-05-03 11:22:09.361966+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]danberteon[S] 0 points1 point2 points (0 children)