Skip to content

Commit 86bb5f7

Browse files
committed
Do not test extra dependencies with Python 3.10
- some dependencies are not available for the beta version - comment out docker tests - setup currently fails, has to be handled separately
1 parent b88851f commit 86bb5f7

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,28 @@ jobs:
7979
shell: bash
8080
- name: Install extra dependencies
8181
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
8388
- name: Run unit tests with extra packages as non-root user
8489
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
8694
- name: Run pytest tests
8795
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
90100
shell: bash
91101
- name: Run performance tests
92102
run: |
93-
if [[ '${{ matrix.os }}' != 'macOS-latest' ]]; then
103+
if [[ '${{ matrix.os }}' != 'macOS-latest' && '${{ matrix.python-version }}' != '3.10.0-beta.1' ]]; then
94104
export TEST_PERFORMANCE=1
95105
python -m pyfakefs.tests.performance_test
96106
fi

CHANGES.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ The released versions correspond to PyPi releases.
1212
### Fixes
1313
* correctly handle byte paths in `os.path.exists`
1414
(see [#595](../../issues/595))
15-
16-
### Fixes
1715
* Update `fake_pathlib` to support changes coming in Python 3.10
1816
([see](https://github.com/python/cpython/pull/19342))
1917

pyfakefs/tests/fake_pathlib_test.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -970,7 +970,22 @@ def test_symlink(self):
970970
def test_stat(self):
971971
path = self.make_path('foo', 'bar', 'baz')
972972
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])
974989

975990
def test_utime(self):
976991
path = self.make_path('some_file')

0 commit comments

Comments
 (0)