Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update filewriter unit tests #226

Closed
prjemian opened this issue Aug 15, 2019 · 2 comments · Fixed by #227
Closed

update filewriter unit tests #226

prjemian opened this issue Aug 15, 2019 · 2 comments · Fixed by #227
Assignees
Milestone

Comments

@prjemian
Copy link
Contributor

prjemian commented Aug 15, 2019

Once a new version of spec2nexus is released that has the fix for empty #O0 & #P0 lines, revise the tests/test_filewriter.py with these lines: https://github.com/prjemian/spec2nexus/blob/a4158a27fdcb64ea6700e62da7b41221057bcecd/tests/test_plugin.py#L200-L209

@prjemian prjemian self-assigned this Aug 15, 2019
@prjemian
Copy link
Contributor Author

Looks like:

    self.assertGreater(scan.header.raw.find("\n#O0 \n"), 0)
    self.assertGreater(scan.header.raw.find("\n#o0 \n"), 0)
    self.assertEqual(len(scan.header.O), 1)
    self.assertEqual(len(scan.header.O[0]), 0)
    self.assertEqual(len(scan.header.o), 1)
    self.assertEqual(len(scan.header.o[0]), 0)
    self.assertGreater(scan.raw.find("\n#P0 \n"), 0)
    self.assertEqual(len(scan.P), 1)
    self.assertEqual(len(scan.P[0]), 0)
    self.assertEqual(len(scan.positioner), 0)

prjemian added a commit that referenced this issue Aug 15, 2019
@prjemian prjemian added this to the 1.1.13 milestone Aug 15, 2019
@prjemian
Copy link
Contributor Author

prjemian commented Aug 15, 2019

add to requirements.txt for spec2nexus >= 2021.1.2 (released just now)

prjemian added a commit that referenced this issue Aug 15, 2019
prjemian added a commit that referenced this issue Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant