Repository: theacodes/nox
Pull request #154 (2018-11-04 05:14:55)

Typo
```diff
- You use this object to to run various commands in your session.
+ You can use this object to run various commands in your session.
```


Patch:
diff --git a/docs/config.rst b/docs/config.rst
index 4cbe227..b9c10b4 100644
--- a/docs/config.rst
+++ b/docs/config.rst
@@ -105,7 +105,8 @@ Using the session object
 
 .. module:: nox.sessions
 
-Nox will call your session functions with a :class:`Session` object. You use this object to to run various commands in your session.
+Nox will call your session functions with a :class:`Session` object.
+You can use this object to run various commands in your session.
 
 .. autoclass:: Session
     :members:
diff --git a/docs/usage.rst b/docs/usage.rst
index a30932d..6d51c81 100644
--- a/docs/usage.rst
+++ b/docs/usage.rst
@@ -69,7 +69,7 @@ Specifying parametrized sessions
 If you have a :ref:`parametrized <parametrized>` session such as::
 
     @nox.parametrize('django', ['1.9', '2.0'])
-    def session_tests(session, django):
+    def tests(session, django):
         ...
 
 Then running ``nox --session tests`` will actually run all parametrized versions of the session. If you want the run the session with a particular set of parametrized arguments, you can specify them with the session name::
diff --git a/nox/sessions.py b/nox/sessions.py
index 0ddf790..a3b0c54 100644
--- a/nox/sessions.py
+++ b/nox/sessions.py
@@ -232,15 +232,10 @@ class Session:
         if not args:
             raise ValueError("At least one argument required to install().")
 
-        self.run(
-            "pip",
-            "install",
-            "--upgrade",
-            *args,
-            silent=True,
-            external="error",
-            **kwargs
-        )
+        if "silent" not in kwargs:
+            kwargs["silent"] = True
+
+        self.run("pip", "install", "--upgrade", *args, external="error", **kwargs)
 
     def notify(self, target):
         """Place the given session at the end of the queue.


Test patch:
diff --git a/tests/test_sessions.py b/tests/test_sessions.py
index 2f5a576..7b4c514 100644
--- a/tests/test_sessions.py
+++ b/tests/test_sessions.py
@@ -199,6 +199,34 @@ class TestSession:
                 external="error",
             )
 
+    def test_install_non_default_kwargs(self):
+        runner = nox.sessions.SessionRunner(
+            name="test",
+            signatures=["test"],
+            func=mock.sentinel.func,
+            global_config=argparse.Namespace(posargs=mock.sentinel.posargs),
+            manifest=mock.create_autospec(nox.manifest.Manifest),
+        )
+        runner.venv = mock.create_autospec(nox.virtualenv.VirtualEnv)
+        runner.venv.env = {}
+
+        class SessionNoSlots(nox.sessions.Session):
+            pass
+
+        session = SessionNoSlots(runner=runner)
+
+        with mock.patch.object(session, "run", autospec=True) as run:
+            session.install("requests", "urllib3", silent=False)
+            run.assert_called_once_with(
+                "pip",
+                "install",
+                "--upgrade",
+                "requests",
+                "urllib3",
+                silent=False,
+                external="error",
+            )
+
     def test_notify(self):
         session, runner = self.make_session_and_runner()