Niteo
  • Startup Studio
  • Projects
  • About
  • Team
  • Careers
  • Blog
  • Contact
  1. Blog
  2. Posts tagged “Testing”
  • Indispensable pytest plugins

    Oct 7, 2022

    —

    by

    Neyts Zupan
    in Tech
    Indispensable pytest plugins

    I’ve been babbling on about testing for a decade now. Here’s a quick list of pytest plugins I use in most of my Python projects:   pytest-cov – pytest integration for the wonderful coverage tool by Ned Batchelder. pytest-mock – pytest integration for the unittest.mock library. pytest-instafail – Print out the test failure as it…

    Read more »: Indispensable pytest plugins
  • Load overrides.zcml in plone.app.testing

    Mar 8, 2013

    —

    by

    Neyts Zupan
    in Tech

    Today I was working on a project where we use overrides.zcml to easily override some default Plone behavior. All was working fine (in the browser, that is) until I started writing tests for our custom behavior. First thing I noticed was that the overrides.zcml was not loaded in our test layer. “Doh, I need to…

    Read more »: Load overrides.zcml in plone.app.testing
  • Robot on Travis – uploading results to S3

    Nov 15, 2012

    —

    by

    Neyts Zupan
    in Tech

    This is a walkthrough of how one could upload to Amazon S3 screenshots and other output files produced by Robot framework ran in a Travis CI build. The reason why we want to do this is to be able to inspect what Robot sees and have more information when a test fails. It’s written with some…

    Read more »: Robot on Travis – uploading results to S3
  • Testing log output

    Jun 3, 2012

    —

    by

    Neyts Zupan
    in Tech

    ATTRIBUTION: This post was inspired by Domen’s Mocking logging module for unittests post back from 2009. Most of the code below is from him, with some added Plone specific bits and pieces. I was recently debugging an installation of our niteoweb.click2sell and had the need for more verbose error handling. After adding support for it…

    Read more »: Testing log output
  • Testing memoized methods

    Jan 6, 2011

    —

    by

    Neyts Zupan
    in Tech

    For a recent Plone project we needed to write unit tests for methods that were using plone.memoize for caching return values. With a standard Plone’s PloneTestCase I got the following error: Error in test test_main_image (niteoweb.elcond.tests.test_stol.TestContent) Traceback (most recent call last): File “/Users/zupo/work/python/parts/opt/lib/python2.6/unittest.py”, line 279, in run testMethod() File “/Users/zupo/work/niteoweb.elcond/src/niteoweb/elcond/tests/test_stol.py”, line 75, in test_main_image image…

    Read more »: Testing memoized methods
  • Testing session in Plone 3.3

    Jan 7, 2010

    —

    by

    Neyts Zupan
    in Tech

    Yesterday, while I was working on LifeInLjubljana.si, I had to test if some data was correctly written to Plone’s session. I couldn’t use the standard ptc.FunctionalTestCase test case as it does not have a session and I would get errors like this: (Pdb) self.context.session_data_manager *** AttributeError: session_data_manager (Pdb) self.context.REQUEST.SESSION *** AttributeError: SESSION Following a tip…

    Read more »: Testing session in Plone 3.3

Search

Topics

  • General
  • Marketing
  • PeopleOps
  • Tech

Latest Posts

  • Sprint season is open
  • Niteo IRL#15 – Kranjska Gora
  • NixCon 2024 Berlin
  • PyCon JP 2024
  • Niteo IRL#13 – Lanzarote
  • EuroPython 2023
  • Niteo Summer IRL meetup in Ljubljana
Projects
  • Flagship
  • Open Source
  • Sold
  • Client
About
  • Venture Lab
  • Company
  • Timeline
  • Giving Back
Team
  • People
  • IRL
  • Conferences
Careers
  • Work & Coworkers
  • Management
  • Benefits
  • Open Jobs
Contact
  • Support
  • Address
  • Legal

© 2007 – 2024 Niteo