![]() log ( * args : Any, ** kwargs : Any ) → None ¶ You the original working directory that Nox was invoked form. To the Noxfile’s directory before running any sessions. Since you can use the -noxfile / -f command-lineĪrgument to run a Noxfile in a location different from your shell’sĬurrent working directory, Nox automatically changes the working directory The directory that Nox was originally invoked from. Returns True if Nox is being run in an interactive session or False otherwise. Running session.install without a virtual environment chdir ( dir : str | os.PathLike ) → _WorkingDirContext ¶Ĭan be used as a context manager to automatically restore the working directory: ![]() cd ( dir : str | os.PathLike ) → _WorkingDirContext ¶Īn alias for chdir(). property cache_dir : Path ¶Ĭreate and return a ‘shared cache’ directory to be used across sessions. The first bin directory for the virtualenv. This is your primary means for installing package and running commands in The Session object is passed into each user-defined session function. ![]() class Session ( runner : SessionRunner ) ¶ Nox will call your session functions with a an instance of the SessionĬlass. parametrize ( "python,dependency", , ) def tests ( session, dependency ). You can also stack the decorator to produce sessions that are a combination of the arguments, for. Ids ( Sequence ) – Optional sequence of test IDs to use for the Where each tuple-element specifies a value for its respectiveĪrgument name, for example. If NĪrgument names were specified, this must be a list of N-tuples, This is a simple list of values, for example. If only one argument name was specified then Values determines how often a session is invoked with differentĪrgument values. Performed during session discovery and each invocation appears as aĪrg_names ( Sequence ) – A list of argument names.Īrg_values_list ( Sequence ]) – The list of argument parametrize ( arg_names : str | list | tuple, arg_values_list : Union ] ], Param, Iterable ], ids : Optional ] = None ) → Callable, Any ] ¶Īdd new invocations to the underlying session function using the list ofĪrg_values_list for the given arg_names. Nox.parametrize() has an interface and usage intentionally similar to pytest’s parametrize. nox > Running session tests(django='2.0') nox > python -m pip install django=2.0 Nox > Running session tests(django='1.9') nox > python -m pip install django=1.9.
0 Comments
Leave a Reply. |