Commit graph

47 commits

Author SHA1 Message Date
Gil Forsyth
6e09e3c266
Non-zero exit code when script path not found 2019-09-09 14:39:36 -04:00
Gil Forsyth
c0b7d1166a
Skip broken test on Windows (sorry)
This is a workaround for strange non-deterministic behavior in pytest
2019-07-13 14:56:17 -04:00
Jean-Benoist Leger
30afd0d13a
Properly clean builtins.__xonsh__ before running test in tests/test_main.py 2019-04-19 23:19:25 +02:00
Anthony Scopatz
1c6b1e1ea4 black 2019-02-13 18:49:39 -05:00
Jake Hedman
7d9e2c617c premain --timings test
Add (currently failing) test to make sure the --timings flag does not
crash xonsh on start.
2018-11-27 22:30:29 +01:00
Jake Hedman
cd730aef4f Reset XonshSession in teach main.py test
Unset builtins.__xonsh__ in shell fixture to make sure main.py tests
pass even if the XonshSession has not been touched by previous tests.

Also set $XONSH_CACHE_SCRIPTS in os.environ instead of
builtins.__xonsh__.env since it's not yet created.
2018-11-27 22:30:29 +01:00
Mickaël Schoentgen
ba2fd9bb00 Fix several ResourceWarning: unclosed file in tests 2018-11-09 10:08:03 +01:00
Anthony Scopatz
89a42458d9 tests pass! 2018-09-13 16:49:09 -04:00
Anthony Scopatz
8c3c357c40 all tests run, but don't pass 2018-09-13 15:19:56 -04:00
Anthony Scopatz
4c91df2abc many test fixes 2018-09-13 14:03:35 -04:00
Anthony Scopatz
634a8ec9f2 black tests 2018-08-30 09:18:49 -05:00
Anthony Scopatz
2086a58993 fixed monkey patched test_main shell 2018-07-14 18:05:54 -05:00
Gil Forsyth
12362d7dd5 Resolve behavior between script call and -i 2017-09-27 19:16:14 -04:00
Gil Forsyth
14df0792de Preserve xonsh interactive flag when running scripts 2017-09-27 19:16:14 -04:00
Gil Forsyth
1f464fb193 Don't load xonshrc is xonsh is running a script
As per discussions with @asmeurer -- if xonsh is being used to launch a script,
e.g.

```
xonsh run_my_cool_deploy.xsh
```

then it should not load the `xonshrc` file since this should be reserved for
interactive functionality and we don't want side effects in the script.

Basically, if you need a xontrib to be loaded for your script, load it in your
script
2017-09-27 19:16:14 -04:00
Gil Forsyth
d33003959e add test for --rc flags 2017-04-21 14:34:47 -04:00
Anthony Scopatz
773069c4f5 Xonsh startup loading refactor 2017-02-13 00:25:38 -05:00
Hugo Wang
335fc71bc7 xonsh script.xsh should not fail over 2017-01-11 21:59:42 +08:00
Hugo Wang
e77695609b raise original error 2016-12-20 12:29:46 +08:00
Hugo Wang
b2078c3f83 updated ut - force it to be interactive 2016-12-18 11:25:39 +08:00
Hugo Wang
76b898ab14 refactoring & updated ut 2016-12-18 11:07:53 +08:00
Hugo Wang
be5dd8e328 failback only for interactive mode 2016-12-18 02:32:08 +08:00
Hugo Wang
d6294e171f ignore screen too 2016-12-17 18:54:28 +08:00
Hugo Wang
6684c802cc failback should ignore xonsh 2016-12-17 18:22:34 +08:00
Hugo Wang
3980da870e make xonsh able to failback to other shells 2016-12-17 18:10:29 +08:00
laerus
daf1928dd0 'fixtures docs' 2016-07-03 12:00:24 +03:00
laerus
5aef18ccfb 'test_main' 2016-07-01 13:35:16 +03:00
Gil Forsyth
6d98baa7d0 Merge branch 'master' into pytest_port 2016-06-23 15:52:53 -04:00
Konstantinos Tsakiltzidis
b55fcee067 'main isatty mock/typo' 2016-06-23 02:46:34 +03:00
Gil Forsyth
560ebb5b1d ugly hack on test_main and finish test_history 2016-06-22 18:28:07 -04:00
Gil Forsyth
6f4fc7564e cleanup and extra fixes 2016-06-22 18:23:36 -04:00
Gil Forsyth
de745dc1f6 remove spurious import and update test_main 2016-06-22 17:49:54 -04:00
Konstantinos Tsakiltzidis
8f2e6d32e8 tests for -D & -i/added .coverage in .gitignore 2016-06-22 11:35:24 +03:00
Konstantinos Tsakiltzidis
ac371166f1 '-D fix/cleanup' 2016-06-22 01:31:55 +03:00
Konstantinos Tsakiltzidis
b830da10d7 'typoz' 2016-06-21 22:20:16 +03:00
Konstantinos Tsakiltzidis
a4333a5520 -l/-i fix, tests undercover 2016-06-21 17:46:41 +03:00
Konstantinos Tsakiltzidis
9d70925704 'refactor argv madness' 2016-06-21 15:22:06 +03:00
Konstantinos Tsakiltzidis
b8c2aa0ca3 'SystemExit (TM)' 2016-06-21 06:42:16 +03:00
Konstantinos Tsakiltzidis
b175c4964d 'excluding failing test (for now)' 2016-06-21 06:40:18 +03:00
Konstantinos Tsakiltzidis
ba87d4f46a failing test for interactive + script case 2016-06-20 21:09:25 +03:00
Konstantinos Tsakiltzidis
f82cb4d88c merged master/test for interactive script/failling 2016-06-20 19:27:53 +03:00
laerus
dfc48b6cab more tests, fail atm 2016-06-19 05:20:53 +03:00
laerus
f25a868aca tests/bugfix for file argument
if a script is passed as argument then
uknown arguments must be passed to the script
2016-06-18 20:14:05 +03:00
laerus
9ebd71c0c6 tests for invalid arguments:
these tests should be replaced with the pytest equivalents
after nose to test transition
2016-06-18 16:29:30 +03:00
adam j hartz
4d5dda3202 one more test case 2016-03-20 21:31:14 -04:00
adam j hartz
c41f255421 update to fix test cases 2016-03-20 19:43:37 -04:00
Benjamin Pollack
533a7e915f Add support for -i and -l options
Support for the login option is very minimal, but the `XONSH_LOGIN`
variable is set in this case so that scripts may take an appropriate
action.

Fixes #517
2015-11-21 18:26:34 -05:00