File tree Expand file tree Collapse file tree 3 files changed +31
-8
lines changed Expand file tree Collapse file tree 3 files changed +31
-8
lines changed Original file line number Diff line number Diff line change @@ -79,18 +79,28 @@ jobs:
79
79
shell : bash
80
80
- name : Install extra dependencies
81
81
run : |
82
- pip install -r extra_requirements.txt
82
+ # some extra dependencies are not avaialble in 3.10 Beta yet
83
+ # so we exclude it from all tests on extra dependencies
84
+ if [[ '${{ matrix.python-version }}' != '3.10.0-beta.1' ]]; then
85
+ pip install -r extra_requirements.txt
86
+ fi
87
+ shell : bash
83
88
- name : Run unit tests with extra packages as non-root user
84
89
run : |
85
- python -m pyfakefs.tests.all_tests
90
+ if [[ '${{ matrix.python-version }}' != '3.10.0-beta.1' ]]; then
91
+ python -m pyfakefs.tests.all_tests
92
+ fi
93
+ shell : bash
86
94
- name : Run pytest tests
87
95
run : |
88
- export PY_VERSION=${{ matrix.python-version }}
89
- $GITHUB_WORKSPACE/.github/workflows/run_pytest.sh
96
+ if [[ '${{ matrix.python-version }}' != '3.10.0-beta.1' ]]; then
97
+ export PY_VERSION=${{ matrix.python-version }}
98
+ $GITHUB_WORKSPACE/.github/workflows/run_pytest.sh
99
+ fi
90
100
shell : bash
91
101
- name : Run performance tests
92
102
run : |
93
- if [[ '${{ matrix.os }}' != 'macOS-latest' ]]; then
103
+ if [[ '${{ matrix.os }}' != 'macOS-latest' && '${{ matrix.python-version }}' != '3.10.0-beta.1' ]]; then
94
104
export TEST_PERFORMANCE=1
95
105
python -m pyfakefs.tests.performance_test
96
106
fi
Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ The released versions correspond to PyPi releases.
12
12
### Fixes
13
13
* correctly handle byte paths in `os.path.exists`
14
14
(see [#595](../../issues/595))
15
-
16
- ### Fixes
17
15
* Update `fake_pathlib` to support changes coming in Python 3.10
18
16
([see](https://github.com/python/cpython/pull/19342))
19
17
Original file line number Diff line number Diff line change @@ -970,7 +970,22 @@ def test_symlink(self):
970
970
def test_stat (self ):
971
971
path = self .make_path ('foo' , 'bar' , 'baz' )
972
972
self .create_file (path , contents = '1234567' )
973
- self .assertEqual (self .os .stat (path ), self .os .stat (self .path (path )))
973
+ self .assertEqual (self .os .stat (path ), self .path (path ).stat ())
974
+
975
+ @unittest .skipIf (sys .version_info < (3 , 10 ), "New in Python 3.10" )
976
+ def test_stat_follow_symlinks (self ):
977
+ self .check_posix_only ()
978
+ directory = self .make_path ('foo' )
979
+ base_name = 'bar'
980
+ file_path = self .path (self .os .path .join (directory , base_name ))
981
+ link_path = self .path (self .os .path .join (directory , 'link' ))
982
+ contents = "contents"
983
+ self .create_file (file_path , contents = contents )
984
+ self .create_symlink (link_path , base_name )
985
+ self .assertEqual (len (contents ),
986
+ link_path .stat (follow_symlinks = True )[stat .ST_SIZE ])
987
+ self .assertEqual (len (base_name ),
988
+ link_path .stat (follow_symlinks = False )[stat .ST_SIZE ])
974
989
975
990
def test_utime (self ):
976
991
path = self .make_path ('some_file' )
You can’t perform that action at this time.
0 commit comments