title: How to override pytest.ini when running tests from the command line?
body: <p>I have a codebase containing multiple python packages. There is also a pytest.ini file that contains the names of these files.</p>
  
  <p>example directory structure:</p>
  
  <pre><code>main_dir
    |
    |
    |--- package1
    |
    |--- package2
    |
    |--- pytest.ini
  </code></pre>
  
  <p>pytest.ini looks like this</p>
  
  <pre><code>[pytest.ini]
  addopts = package1 package2
  </code></pre>
  
  <p>The issue is because of <code>pytest.ini</code> I am not able to run tests just package wise. For example <code>py.test package1\</code> now runs tests for <code>package2</code> tests as well.</p>
  
  <p>If I remove pytest.ini file, the command works as expected. Only option I see is to maintain an uncommitted version of pytest.ini which I keep changing according to my needs.</p>
  
  <p>How do I override the pytest.ini settings and run tests only package wise?</p>