How to pass in arguments to nosetests on command line
<p>I am writing api tests and running them with nose and would like to pass in arguments like test domain. One way to do it would be to set environment variables. But I am looking for something like <code>$ nosetests --test-domain=http://xx.x.xxx.xxx:xxxx</code>. Is there a way for me to implement this?</p>

<p>Here is some of my test code and I would like to pass in test domain name instead of hard coding it in the test.</p>

<pre><code>import unittest
from utils import HTTPClient


class TestProfiles(unittest.TestCase):

    def setUp(self):
        test_domain = "http://xx.x.xxx.xxx:xxxx"
        headers = {}
        auth_token = "Bearer rtghyuGsHitiYWQzOWRiZmU6ODUwZTYldorkfTE2NTEwYTk3ZTg3YMdmNzRkZjc1NDg0OTgxYzNkYzU2NjExZw"
        headers["Authorization"] = auth_token
        self.client = HTTPClient(test_domain, headers)

    def test_get_profiles_valid(self):
        path = "/v1/users/033a60d5-3339-4898-93e5-83f1a5a46cbe/profiles"
        r = self.client.request(path)
        self.assertEqual(r.status_code, 200)
</code></pre>

<p>If I have no other choice I will use env variables and run the test with:</p>

<p><code>$ TEST_DOMAIN=http://xx.x.xxx.xxx:xxxx nosetests</code></p>