question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regression in >= 3.5.3 when running in python 2.7

See original GitHub issue

builtin data types (and propably something else too) removed (?) after a call to setupPyFakefs() in and after 3.5.3 release with python 2.7.

Run following

from unittest import main as run_tests
import sys

class TestSuites(TestCase):
    def setUp(self):
        self.setUpPyfakefs()
    def test_foo(self):
        real_foo = False

if __name__ == '__main__':
        run_tests(failfast=False, buffer=False, catchbreak=False)

throws following error:

E
======================================================================
ERROR: test_foo (__main__.TestSuites)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_acceptance.py", line 9, in test_foo
NameError: global name 'False' is not defined

----------------------------------------------------------------------
Ran 1 test in 0.009s

FAILED (errors=1)

Same issue doesn’t seem to effect python3 with same library version.

Darwin-18.0.0-x86_64-i386-64bit (‘Python’, ‘2.7.15 (default, Nov 27 2018, 21:40:55) \n[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.5)]’) (‘pyfakefs’, ‘3.5.3’)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
mrbean-bremencommented, Feb 19, 2019

Ok, thanks - I will consider this fixed then. I will probably put together a new release soon, after the other outstanding issues are resolved. Thanks for the report and the help!

1reaction
mrbean-bremencommented, Feb 14, 2019

Yes, something like this. I had some problems with that approach, which I don’t remember right now - I wasn’t happy with the curretn solution, but it seemed to work. Also I have to check why the unit tests pass that test this behavior - they are obviously not adequate.

Read more comments on GitHub >

github_iconTop Results From Across the Web

m switch regression in Python 3.5.2 (under rare circumstances)
For my use case that's not required though so in the module I can just do: if __name__ == '__main__': print('running module as...
Read more >
python 3.x - ValueError: Expected 2D array, got 1D array instead
While practicing Simple Linear Regression Model I got this error, I think there is something wrong with my data set. This is error...
Read more >
Regression tests failed with invalid syntax error #444 - GitHub
All my regression tests have failed with invalid syntax in errorPlotting.py file. ... Future versions of macOS will not include Python 2.7.
Read more >
MGWR 2.2 User Manual - Arizona State University
implementation of multiscale geographically weighted regression for ... 3.4.2 Selecting X and Y Coordinate Variables . ... 3.5.3 Specifying GWR Mode.
Read more >
What's new in 0.25.0 (July 18, 2019) - Pandas
x series of releases, pandas only supports Python 3.5.3 and higher. See Dropping Python 2.7 for more details. Warning. The minimum supported ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found